File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ linters:
2323 # - "jsontags" # Ensure every field has a json tag.
2424 # - "maxlength" # Ensure all strings and arrays have maximum lengths/maximum items.
2525 # - "nobools" # Bools do not evolve over time, should use enums instead.
26- # - "nofloats" # Ensure floats are not used.
26+ - " nofloats" # Ensure floats are not used.
2727 # - "optionalorrequired" # Every field should be marked as `+optional` or `+required`.
2828 # - "requiredfields" # Required fields should not be pointers, and should not have `omitempty`.
2929 - " statussubresource" # All root objects that have a `status` field should have a status subresource.
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ import (
3030// Limit defines the maximum frequency of some events.
3131// Limit is represented as number of events per second.
3232// A zero Limit allows no events.
33+ //
34+ //nolint:kubeapilinter // This is an internal rate limiter implementation, not a Kubernetes API
3335type Limit float64
3436
3537// Inf is the infinite rate limit; it allows all events (even if burst is zero).
@@ -66,6 +68,8 @@ func Every(interval time.Duration) Limit {
6668// or its associated context.Context is canceled.
6769//
6870// The methods AllowN, ReserveN, and WaitN consume n tokens.
71+ //
72+ //nolint:kubeapilinter // This is an internal rate limiter implementation, not a Kubernetes API
6973type Limiter struct {
7074 mu sync.Mutex
7175 limit Limit
@@ -117,6 +121,8 @@ func (lim *Limiter) AllowN(now time.Time, n int) bool {
117121
118122// A Reservation holds information about events that are permitted by a Limiter to happen after a delay.
119123// A Reservation may be canceled, which may enable the Limiter to permit additional events.
124+ //
125+ //nolint:kubeapilinter // This is an internal rate limiter implementation, not a Kubernetes API
120126type Reservation struct {
121127 ok bool
122128 lim * Limiter
You can’t perform that action at this time.
0 commit comments