Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManagerConfig ¶
ManagerConfig contains the resources and information required to create a Manager.
func (ManagerConfig) Validate ¶
func (config ManagerConfig) Validate() error
Validate returns an error if the configuration contains invalid information or missing resources.
type ManagerWorker ¶
type ManagerWorker interface { leadership.Checker leadership.Claimer Kill() Wait() error }
ManagerWorker implements leadership functions, and worker.Worker. We don't import worker because it pulls in a lot of dependencies and causes import cycles when you try to use leadership in state. We should break this cycle elsewhere if we can.
func NewManager ¶
func NewManager(config ManagerConfig) (ManagerWorker, error)
NewManager returns a Manager implementation, backed by a lease.Client, which (in addition to its exposed Manager capabilities) will expire all known leases as they run out. The caller takes responsibility for killing, and handling errors from, the returned Worker.