Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IgnoreHandler ¶
IgnoreHandler deal with the signal that should be ignored
func RegisterSignalHandlers ¶
func RegisterSignalHandlers(signalTable *SignalTable)
RegisterSignalHandlers register signal handlers
func TermHandler ¶
TermHandler deal with the signal that should terminate the process
Types ¶
type SignalTable ¶
type SignalTable struct {
// contains filtered or unexported fields
}
func NewSignalTable ¶
func NewSignalTable() *SignalTable
NewSignalTable creates and init signal table
func (*SignalTable) GetKeyPrefix ¶
func (t *SignalTable) GetKeyPrefix() string
GetKeyPrefix get key prefix
func (*SignalTable) Register ¶
func (t *SignalTable) Register(s os.Signal, handler signalHandler)
Register registers signal handle to the table
func (*SignalTable) SetKeyPrefix ¶
func (t *SignalTable) SetKeyPrefix(key string)
SetKeyPrefix set key prefix
func (*SignalTable) SignalStateGet ¶
func (t *SignalTable) SignalStateGet() ([]byte, error)
SignalStateGet get state counter of signal handle
func (*SignalTable) StartSignalHandle ¶
func (t *SignalTable) StartSignalHandle()
StartSignalHandle start go-routine for signal handle
Click to show internal directories.
Click to hide internal directories.