Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAlreadyStarted is returned when somebody tries to start an already // running service. ErrAlreadyStarted = errors.New("already started") // ErrNotStarted is returned when somebody tries to stop a not running // service. ErrNotStarted = errors.New("not started") )
Functions ¶
This section is empty.
Types ¶
type BaseService ¶
func NewBaseService ¶
func NewBaseService(name string, impl Service) *BaseService
NewBaseService creates a new BaseService.
func (*BaseService) IsRunning ¶
func (bs *BaseService) IsRunning() bool
IsRunning() check if services is running
func (*BaseService) SetLogger ¶
func (bs *BaseService) SetLogger(l *log.Entry)
SetLogger implements Service by setting a logger.
func (*BaseService) Terminate ¶
func (bs *BaseService) Terminate() <-chan struct{}
Terminate() return chan if services is terminated
Click to show internal directories.
Click to hide internal directories.