Documentation ¶
Overview ¶
Package executor contains a task executor / scheduler for the constellation node operator. It is used to execute tasks (outside of the k8s specific operator controllers) with regular intervals and based of external triggers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { PollingFrequency time.Duration RateLimiter RateLimiter }
Config is the configuration for the executor.
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig creates a new default configuration.
type Controller ¶
Controller is a type with a reconcile method. It is modeled after the controller-runtime reconcile method, but reconciles on external resources instead of k8s resources.
type Executor ¶
type Executor interface { Start(ctx context.Context) StopWaitFn Running() bool Trigger() }
Executor is a task executor / scheduler.
type RateLimiter ¶
type RateLimiter interface { // When gets an item and gets to decide how long that item should wait When(item any) time.Duration // Forget indicates that an item is finished being retried. Doesn't matter whether its for perm failing // or for success, we'll stop tracking it Forget(item any) }
RateLimiter is a stripped down version of the controller-runtime ratelimiter.RateLimiter interface.
type StopWaitFn ¶
type StopWaitFn func()
StopWaitFn is a function that can be called to stop the executor and wait for it to stop.