Documentation ¶
Index ¶
- type LogPaylaodMetadata
- type LogRateLimiter
- func (rateLimiter *LogRateLimiter) Acquire(payloadMetadata interface{}) (bool, error)
- func (rateLimiter *LogRateLimiter) IncRequestCount()
- func (rateLimiter *LogRateLimiter) ResetRequestCount()
- func (rateLimiter *LogRateLimiter) Run(ctx context.Context)
- func (rateLimiter *LogRateLimiter) Shutdown(_ context.Context)
- type LogRateLimiterSetting
- type MetricsPaylaodMetadata
- type MetricsRateLimiter
- func (rateLimiter *MetricsRateLimiter) Acquire(payloadMetadata interface{}) (bool, error)
- func (rateLimiter *MetricsRateLimiter) IncRequestCount()
- func (rateLimiter *MetricsRateLimiter) ResetRequestCount()
- func (rateLimiter *MetricsRateLimiter) Run(ctx context.Context)
- func (rateLimiter *MetricsRateLimiter) Shutdown(_ context.Context)
- type MetricsRateLimiterSetting
- type RateLimiter
- type TracePayloadMetadata
- type TraceRateLimiter
- type TraceRateLimiterSetting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogPaylaodMetadata ¶ added in v1.0.0
type LogPaylaodMetadata struct { }
type LogRateLimiter ¶
type LogRateLimiter struct {
// contains filtered or unexported fields
}
LogRateLimiter represents the RateLimiter config for logs
func NewLogRateLimiter ¶
func NewLogRateLimiter(setting LogRateLimiterSetting) (*LogRateLimiter, error)
NewLogRateLimiter creates RateLimiter implementation for logs using RateLimiterSetting
func (*LogRateLimiter) Acquire ¶
func (rateLimiter *LogRateLimiter) Acquire(payloadMetadata interface{}) (bool, error)
Acquire checks if the requests count for logs is reached to maximum allocated quota per minute.
func (*LogRateLimiter) IncRequestCount ¶
func (rateLimiter *LogRateLimiter) IncRequestCount()
IncRequestCount increaments the request count associated with logs by 1
func (*LogRateLimiter) ResetRequestCount ¶
func (rateLimiter *LogRateLimiter) ResetRequestCount()
ResetRequestCount resets the request count associated with logs to 0
func (*LogRateLimiter) Run ¶
func (rateLimiter *LogRateLimiter) Run(ctx context.Context)
Run starts the timer for reseting the logs request counter
func (*LogRateLimiter) Shutdown ¶
func (rateLimiter *LogRateLimiter) Shutdown(_ context.Context)
Shutdown triggers the shutdown of the LogRateLimiter
type LogRateLimiterSetting ¶ added in v1.0.0
type LogRateLimiterSetting struct {
RequestCount int
}
type MetricsPaylaodMetadata ¶ added in v1.0.0
type MetricsPaylaodMetadata struct { }
type MetricsRateLimiter ¶
type MetricsRateLimiter struct {
// contains filtered or unexported fields
}
MetricsRateLimiter represents the RateLimiter config for metrics
func NewMetricsRateLimiter ¶
func NewMetricsRateLimiter(setting MetricsRateLimiterSetting) (*MetricsRateLimiter, error)
NewMetricsRateLimiter creates RateLimiter implementation for metrics using RateLimiterSetting
func (*MetricsRateLimiter) Acquire ¶
func (rateLimiter *MetricsRateLimiter) Acquire(payloadMetadata interface{}) (bool, error)
Acquire checks if the requests count for metrics is reached to maximum allocated quota per minute.
func (*MetricsRateLimiter) IncRequestCount ¶
func (rateLimiter *MetricsRateLimiter) IncRequestCount()
IncRequestCount increaments the request count associated with metrics by 1
func (*MetricsRateLimiter) ResetRequestCount ¶
func (rateLimiter *MetricsRateLimiter) ResetRequestCount()
ResetRequestCount resets the request count associated with metrics to 0
func (*MetricsRateLimiter) Run ¶
func (rateLimiter *MetricsRateLimiter) Run(ctx context.Context)
Run starts the timer for reseting the metrics request counter
func (*MetricsRateLimiter) Shutdown ¶
func (rateLimiter *MetricsRateLimiter) Shutdown(_ context.Context)
Shutdown triggers the shutdown of the MetricsRateLimiter
type MetricsRateLimiterSetting ¶ added in v1.0.0
type MetricsRateLimiterSetting struct {
RequestCount int
}
type RateLimiter ¶
type RateLimiter interface { // IncRequestCount() Acquire(payloadMetadata interface{}) (bool, error) // ResetRequestCount() Run(context.Context) Shutdown(context.Context) }
RateLimiter represents the RateLimiter operations
type TracePayloadMetadata ¶ added in v1.0.0
type TracePayloadMetadata struct {
RequestSpanCount uint64
}
type TraceRateLimiter ¶
type TraceRateLimiter struct {
// contains filtered or unexported fields
}
TraceRateLimiter represents the RateLimiter config for traces
func NewTraceRateLimiter ¶
func NewTraceRateLimiter(setting TraceRateLimiterSetting) (*TraceRateLimiter, error)
NewTraceRateLimiter creates RateLimiter implementation for traces using RateLimiterSetting
func (*TraceRateLimiter) Acquire ¶
func (rateLimiter *TraceRateLimiter) Acquire(payloadMetadata interface{}) (bool, error)
Acquire checks if the requests count for traces is reached to maximum allocated quota per minute.
func (*TraceRateLimiter) Run ¶
func (rateLimiter *TraceRateLimiter) Run(ctx context.Context)
Run starts the timer for reseting the traces request counter
func (*TraceRateLimiter) Shutdown ¶
func (rateLimiter *TraceRateLimiter) Shutdown(_ context.Context)
Shutdown triggers the shutdown of the LogRateLimiter