Documentation
¶
Overview ¶
Package service defines a service that deals with exit signals.
Index ¶
- Variables
- type Config
- type Manager
- type Service
- func (s *Service) Config() interface{}
- func (s *Service) Desc() string
- func (s *Service) ID() string
- func (s *Service) Name() string
- func (s *Service) Needs() map[string]struct{}
- func (s *Service) Plug(handlers map[string]interface{}) error
- func (s *Service) Run(ctx context.Context, running, stopping func()) error
- func (s *Service) SetConfig(config interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotManager is returned when the connected service is not a // manager. ErrNotManager = errors.New("connected service is not a manager") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Manager is the name of the manager service. Manager string `toml:"manager" comment:"The name of the manager service."` // AllowForcedShutdown allows forces shutdown by sending a second signal. AllowForcedShutdown bool `toml:"allow_forced_shutdown" comment:"Allow forced shutdown by sending second signal."` }
Config contains configuration options for the Signal Handler service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the Signal Handler service.
func (*Service) Config ¶
func (s *Service) Config() interface{}
Config returns the current service configuration or creates one with good default values.
Directories
¶
Path | Synopsis |
---|---|
Package mockservice is a generated GoMock package.
|
Package mockservice is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.