ratelimit

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	NumberOfDroppedProcessEvents uint64 `json:"number_of_dropped_process_events"`
}

type InfoEvent

type InfoEvent struct {
	RateLimitInfo *Info     `json:"rate_limit_info"`
	NodeName      string    `json:"node_name"`
	Time          time.Time `json:"time"`
}

type RateLimiter

type RateLimiter struct {
	*rate.Limiter
	// contains filtered or unexported fields
}

func NewRateLimiter

func NewRateLimiter(ctx context.Context, interval time.Duration, numEvents int, encoder *json.Encoder) *RateLimiter

func (*RateLimiter) Drop

func (r *RateLimiter) Drop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL