Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
loki/pkg/validation/rate.go

18 lines
421 B

package validation
import "golang.org/x/time/rate"
// RateLimit is a colocated limit & burst config. It largely exists to
// eliminate accidental misconfigurations due to race conditions when
// requesting the limit & burst config sequentially, between which the
// Limits configuration may have updated.
type RateLimit struct {
Limit rate.Limit
Burst int
}
var Unlimited = RateLimit{
Limit: rate.Inf,
Burst: 0,
}