// SetMaxRate sets the max rate on all known throttlers.
190227
func (m *managerImpl) SetMaxRate(rate int64) []string {
	m.mu.Lock()
	defer m.mu.Unlock()

	for _, t := range m.throttlers {
		t.SetMaxRate(rate)
	}
	return m.throttlerNamesLocked()
}
346661
func (h *ADXL345Driver) SetRate(rate byte) (err error) {
	if rate <= ADXL345_RATE_3200HZ {
		return errors.New("not a valid rate")
	}
	h.bwRate.rate = rate & 0x0F
	if _, err := h.connection.Write([]byte{ADXL345_REG_BW_RATE, h.bwRate.toByte()}); err != nil {
		return err
	}
	return
}
1134085
func (c *client) MaxRates(ctx context.Context) (map[string]int64, error) {
	response, err := c.gRPCClient.MaxRates(ctx, &throttlerdatapb.MaxRatesRequest{})
	if err != nil {
		return nil, vterrors.FromGRPC(err)
	}
	return response.Rates, nil
}
1119422
func (s *UpdateRateBasedRuleInput) SetRateLimit(v int64) *UpdateRateBasedRuleInput {
	s.RateLimit = &v
	return s
}
478212
func (s *Datapoint) SetMaximum(v float64) *Datapoint {
	s.Maximum = &v
	return s
}
197276
func (s *AssociationVersionInfo) SetMaxConcurrency(v string) *AssociationVersionInfo {
	s.MaxConcurrency = &v
	return s
}
1252164
func (s *SetSourceRequest) SetMaxBitrate(v int64) *SetSourceRequest {
	s.MaxBitrate = &v
	return s
}
258016
func (s *RegisterScalableTargetInput) SetMaxCapacity(v int64) *RegisterScalableTargetInput {
	s.MaxCapacity = &v
	return s
}
1357599
func (s *Semaphore) SetMax(max int) error {
	diff := s.Max - max

	s.Semaphore = s.Semaphore - diff
	s.Max = s.Max - diff

	return nil
}
790502
func (s *CacheBehavior) SetMaxTTL(v int64) *CacheBehavior {
	s.MaxTTL = &v
	return s
}
737062
func (s *MaxCountRule) SetMaxCount(v int64) *MaxCountRule {
	s.MaxCount = &v
	return s
}
1247559
func (s *StatisticSet) SetMaximum(v float64) *StatisticSet {
	s.Maximum = &v
	return s
}
930553
func (c *client) SetMaxRate(ctx context.Context, rate int64) ([]string, error) {
	request := &throttlerdatapb.SetMaxRateRequest{
		Rate: rate,
	}

	response, err := c.gRPCClient.SetMaxRate(ctx, request)
	if err != nil {
		return nil, vterrors.FromGRPC(err)
	}
	return response.Names, nil
}
1161033
func (s *RouteSettings) SetThrottlingBurstLimit(v int64) *RouteSettings {
	s.ThrottlingBurstLimit = &v
	return s
}
808027
func (s *AacSettings) SetRateControlMode(v string) *AacSettings {
	s.RateControlMode = &v
	return s
}
705533
func (opts *Options) SetRateLimitDelayMaxMilliseconds(value uint) {
	C.rocksdb_options_set_rate_limit_delay_max_milliseconds(opts.c, C.uint(value))
}
418738
func (s *Reader) SetRateLimit(bytesPerSec float64) {
	s.limiter = rate.NewLimiter(rate.Limit(bytesPerSec), burstLimit)
	s.limiter.AllowN(time.Now(), burstLimit) // spend initial burst
}