Documentation ¶
Overview ¶
Package watch provides netlink watchers via multicast groups.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateLimitedTrigger ¶ added in v1.5.6
type RateLimitedTrigger struct {
// contains filtered or unexported fields
}
RateLimitedTrigger wraps a Trigger with rate limiting.
func NewDefaultRateLimitedTrigger ¶ added in v1.5.6
func NewDefaultRateLimitedTrigger(ctx context.Context, trigger Trigger) *RateLimitedTrigger
NewDefaultRateLimitedTrigger creates a new RateLimitedTrigger with default params.
func NewRateLimitedTrigger ¶ added in v1.5.6
func NewRateLimitedTrigger(ctx context.Context, trigger Trigger, rateLimit rate.Limit, burst int) *RateLimitedTrigger
NewRateLimitedTrigger creates a new RateLimitedTrigger with specified params.
Trigger's goroutine exists when the context is canceled.
func (*RateLimitedTrigger) QueueReconcile ¶ added in v1.5.6
func (t *RateLimitedTrigger) QueueReconcile()
QueueReconcile implements Trigger interface.
The event is queued if the goroutine is ready to accept it (otherwise it's already busy processing a previous event). This function returns immediately.
type Trigger ¶
type Trigger interface {
QueueReconcile()
}
Trigger is used by watcher to trigger reconcile loops.
type Watcher ¶
type Watcher interface {
Done()
}
Watcher interface allows to stop watching.
func NewEthtool ¶
NewEthtool starts ethtool watch.