Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option[T comparable] func(*WorkSet[T])
func WithLogger ¶
func WithLogger[T comparable](logger *zap.SugaredLogger) Option[T]
WithLogger sets the logger
func WithTaskInterval ¶
func WithTaskInterval[T comparable](d time.Duration) Option[T]
WithTaskInterval sets the task interval
type ProcessFunc ¶
type ProcessFunc[T comparable] func(ctx context.Context, key T) error
ProcessFunc handles one AgentDeploy per invocation.
type WorkSet ¶
type WorkSet[T comparable] struct { // contains filtered or unexported fields }
func NewWorkSet ¶
func NewWorkSet[T comparable](name string, processFunc ProcessFunc[T], opts ...Option[T]) *WorkSet[T]
func (*WorkSet[T]) Snapshot ¶
func (w *WorkSet[T]) Snapshot() []T
Snapshot returns a copy of the current keys for a component to iterate without holding the lock or racing concurrent Track/Forget.
Click to show internal directories.
Click to hide internal directories.