Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Coo is the optional amount of time that this sequence handler specifies to
// wait before being executed again. This cooler duration is not an interval
// on a strict schedule. This is simply the time to sleep after execution,
// before another cycle repeats.
Coo time.Duration
// Han is the list of worker handlers implementing the actual business logic
// as a directed acyclic graph. The worker handlers configured here may be
// wrapped in administrative handler implementations to e.g. instrument
// handler execution latency and handler error rates. All worker handlers
// provided here will be executed sequentially within the same failure domain.
Han [][]handler.Ensure
// Log is a standard logger interface to forward structured log messages to
// any output interface e.g. stdout.
Log logger.Interface
// Reg is the metrics interface used to wrap the internally managed handlers
// for instrumentation purposes. The metrics handlers created by this registry
// will record all worker handler execution metrics.
Reg *registry.Registry
}
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func (*Worker) Ensure ¶
Ensure executes a single reconciliation loop of the directed acyclic graph. This method is exposed publicly so that not only the worker daemon can run this sequence of worker handlers continuously, but also to enable other commands to run this sequence once in a controlled fashion.
Click to show internal directories.
Click to hide internal directories.