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 worker engine
// 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. Note that Worker.Daemon is
// explicitly disabled if Coo is not provided. Regardless, Worker.Ensure may
// be used on demand even without specified cooler duration.
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
}
Click to show internal directories.
Click to hide internal directories.