Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyFunc ¶
ApplyFunc is a func that needs to be applied on seeing a particular key be passed to an Applyinator
type Applyinator ¶
Applyinator is an interface that eventually ensures that a requested action, identified by some key, is applied. Any object that implements Applyinator should provide the same guarantees as the k8s.io/client-go/util/workqueue implementation, namely:
* Fair: items processed in the order in which they are added. * Stingy: a single item will not be processed multiple times concurrently, and if an item is added multiple times before it can be processed, it will only be processed once. * Multiple consumers and producers. In particular, it is allowed for an item to be reenqueued while it is being processed.
func NewApplyinator ¶
func NewApplyinator(name string, applyFunc ApplyFunc, opts *Options) Applyinator
NewApplyinator allows you to register a function that applies an action based on whether a particular key is enqueued via a call to Apply. It implements k8s.io/client-go/util/workqueue under the hood, which allows us to ensure that the apply function is called with the following guarantees (provided by workqueues):
* Fair: items processed in the order in which they are added. * Stingy: a single item will not be processed multiple times concurrently, and if an item is added multiple times before it can be processed, it will only be processed once. * Multiple consumers and producers. In particular, it is allowed for an item to be reenqueued while it is being processed.
type Options ¶
type Options struct {
RateLimiter workqueue.RateLimiter
}
Options are options that can be specified to configure a desired Applyinator