Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrLimitExceeded = errors.New("not enough tokens")
)
Functions ¶
This section is empty.
Types ¶
type IndividualSerializer ¶
type IndividualSerializer struct {
// contains filtered or unexported fields
}
IndividualSerializer instances serialize each metric individually using the serializer's Serialize() function and add the resulting output to the buffer until the limit is reached. This only works for serializers NOT requiring the serialization of a batch as-a-whole.
func NewIndividualSerializer ¶
func NewIndividualSerializer(s telegraf.Serializer) *IndividualSerializer
func (*IndividualSerializer) SerializeBatch ¶
type RateLimitConfig ¶
type RateLimitConfig struct {
Limit config.Size `toml:"rate_limit"`
Period config.Duration `toml:"rate_limit_period"`
}
func (*RateLimitConfig) CreateRateLimiter ¶
func (cfg *RateLimitConfig) CreateRateLimiter() (*RateLimiter, error)
type RateLimiter ¶
func (*RateLimiter) Release ¶
func (r *RateLimiter) Release()
func (*RateLimiter) Reserve ¶
func (r *RateLimiter) Reserve(used int64)
Click to show internal directories.
Click to hide internal directories.