Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyServerPointer = errors.New("server pointer should not be nil")
ErrEmptyServerPointer declares error for nil pointer
View Source
var ErrNotImplemented = errors.New("this method is not implemented")
ErrNotImplemented declares error for method that isn't implemented
Functions ¶
This section is empty.
Types ¶
type Grace ¶
type Grace struct {
Period int
}
Grace contains attributes of graceful shutdown process
type Operations ¶
type Operations struct {
// contains filtered or unexported fields
}
Operations implements simplest Operator interface
func NewOperator ¶
func NewOperator(cfg *Config, sd ...Shutdowner) *Operations
NewOperator creates operator
func (Operations) Maintenance ¶
func (o Operations) Maintenance() error
Maintenance operation implementation
type Shutdowner ¶
Shutdowner defines Shutdown interface
type SignalType ¶
type SignalType int
SignalType describe
const ( // Shutdown defines signals for shutdown process Shutdown SignalType = iota // Reload defines signals for reload process Reload // Maintenance defines signals for maintenance process Maintenance )
func (SignalType) String ¶
func (s SignalType) String() string
type Signals ¶
type Signals struct {
// contains filtered or unexported fields
}
Signals for defined processes
func (*Signals) Add ¶
func (s *Signals) Add(sig os.Signal, sigType SignalType)
Add appends signal by specified type
func (*Signals) Get ¶
func (s *Signals) Get(sigType SignalType) (signals []os.Signal)
Get signals by specified type
Click to show internal directories.
Click to hide internal directories.