signal_table

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IgnoreHandler

func IgnoreHandler(s os.Signal)

IgnoreHandler deal with the signal that should be ignored

func RegisterSignalHandlers

func RegisterSignalHandlers(signalTable *SignalTable)

register signal handlers

func TermHandler

func TermHandler(s os.Signal)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL