Documentation ¶
Overview ¶
Package startstop provides useful functionality for starting and stopping agent components.
The Startable and Stoppable interfaces define components that can be started and stopped, respectively. The package then provides utility functionality to start and stop components either concurrently or in series.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StartStoppable ¶
StartStoppable represents a startable and stopable object
type Starter ¶
Starter starts a group of startable objects from a data pipeline
func NewStarter ¶
NewStarter returns a new serial starter.
The Start() method of this object will start all components, one by one, in the order they were added.
Any components included in the arguments will be included in the set of components, as if starter.Add(..) had been called for each.
type Stopper ¶
Stopper stops a group of stoppable objects from a data pipeline
func NewParallelStopper ¶
NewParallelStopper returns a new parallel stopper.
The Stop() method of this object will stop all components concurrently, calling each component's Stop method in a dedicated goroutine. It will return only when all Stop calls have completed.
Any components included in the arguments will be included in the set of components, as if stopper.Add(..) had been called for each.
func NewSerialStopper ¶
NewSerialStopper returns a new serial stopper.
The Stop() method of this object will stop all components, one by one, in the order they were added.
Any components included in the arguments will be included in the set of components, as if stopper.Add(..) had been called for each.