Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlreadyRunning = errors.New("Service already running")
Functions ¶
func LazyService ¶
Types ¶
type ErrorCollector ¶
type ErrorCollector struct {
// contains filtered or unexported fields
}
func NewErrorCollector ¶
func NewErrorCollector() *ErrorCollector
func (*ErrorCollector) Add ¶
func (ec *ErrorCollector) Add(err error)
func (*ErrorCollector) Error ¶
func (ec *ErrorCollector) Error() error
type RunningLock ¶
type RunningLock struct {
// contains filtered or unexported fields
}
func (*RunningLock) Disable ¶
func (rl *RunningLock) Disable()
func (*RunningLock) EnableOrFail ¶
func (rl *RunningLock) EnableOrFail() error
func (*RunningLock) Running ¶
func (rl *RunningLock) Running() bool
type Service ¶
type Service interface { // Name retrieves the name of the service, that will be used // to identify the service in log messages Name() string // Running indicates if the service is currently running Running() bool // Start runs the service and blocks until the service finishes, // returns an error when service failed Start(ctx context.Context) error }
type ServiceManager ¶
type ServiceManager struct {
// contains filtered or unexported fields
}
func NewServiceManager ¶
func NewServiceManager(ctx context.Context) *ServiceManager
func (*ServiceManager) Add ¶
func (sm *ServiceManager) Add(srv Service)
func (*ServiceManager) Wait ¶
func (sm *ServiceManager) Wait() error
type ServieFactory ¶
Click to show internal directories.
Click to hide internal directories.