# Functions
New creates new Service which will start and stop passing unit.
NewCompositeUnit creates a new composite unit.
NewPeriodicWorker creates a new instance of PeriodicWorker with constant delays.
NewPeriodicWorkerWithOpts creates a new instance of PeriodicWorker with an ability to specify different optional parameters.
NewWithOpts is a more configurable version of New.
NewWorkerUnit creates a new instance of WorkerUnit.
NewWorkerUnitWithOpts creates a new instance of WorkerUnit with an ability to specify different optional parameters.
# Variables
ErrPeriodicWorkerStop is an error that may be used for interrupting PeriodicWorker's loop.
ErrWorkerUnitStopTimeoutExceeded is an error that occurs when WorkerUnit's gracefully stop timeout is exceeded.
# Structs
CompositeUnit represents a composition of service units and implements Composite design pattern.
CompositeUnitError is an error which may occurs in CompositeUnit's methods.
Opts represents an options for Service.
PeriodicWorker represents a worker that runs underlying worker periodically.
PeriodicWorkerOpts contains optional parameters for constructing PeriodicWorker.
Service represents a service which can register metrics in Prometheus client, start unit and stop it in a graceful way by OS signal.
WorkerUnit allows presenting Worker as Unit.
WorkerUnitOpts contains optional parameters for constructing PeriodicWorker.
# Interfaces
MetricsRegisterer is an interface for objects that can register its own metrics.
Unit is a common interface for all service units.
Worker performs some (usually long-running) work.
# Type aliases
WorkerFunc is an adapter to allow the use of ordinary functions as Worker.