Documentation ¶
Index ¶
- func Main(configs ...Config)
- func Par(funcs ...func())
- type Component
- type Config
- type Dependencies
- type DependencyConfig
- type DependencyKey
- type DependencySlot
- type ErrorSink
- type StartFunc
- func Aggregate(startFuncs ...StartFunc) StartFunc
- func Reset(reset <-chan struct{}, startFunc StartFunc) StartFunc
- func Restart(interval time.Duration, start StartFunc) StartFunc
- func SimpleComponent(f func(stop <-chan struct{}, errs ErrorSink)) StartFunc
- func Ticker(interval time.Duration, tick func(errs ErrorSink)) StartFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Component ¶
type Component interface { // Stop the component. The implementation of this component // should be synchronous: When it returns, all resources of // the component should have been released, and any activity // associated with the component has ceased. The component // supervisor may call this function at most once. Stop() }
A component is simply something that can be stopped
func NullStartFunc ¶
type Config ¶
type Config interface { Populate(*Dependencies) Prepare() (StartFunc, error) }
type Dependencies ¶
func (*Dependencies) Dependency ¶
func (deps *Dependencies) Dependency(slot DependencySlot)
type DependencyConfig ¶
type DependencyConfig interface { Populate(*Dependencies) MakeValue() (interface{}, StartFunc, error) }
type DependencyKey ¶
type DependencyKey interface {
MakeConfig() DependencyConfig
}
type DependencySlot ¶
type DependencySlot interface { Key() DependencyKey Assign(value interface{}) }
Click to show internal directories.
Click to hide internal directories.