package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: May 27, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Lifecycle struct {
}
Lifecycle implements the lifecycle of a service, i.e. Start and Stop.
New returns a new Lifecycle.
Start starts the service.
State returns the state of the service.
type Opt func(opts *options)
Opt sets a Lifecycle option.
func WithStart(start func()) Opt
WithStart sets the start function which is invoked when Start() is called.
func WithStop(stop func()) Opt
WithStop sets the stop function which is invoked when Stop() is called.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.