syssignal

package
v0.0.0-...-06a57e6 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SysSignalHandled = 1 // signal has triggered
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SignalModule

type SignalModule struct {
	sync.Mutex
	cm.ControlMsgPipe
	// contains filtered or unexported fields
}

signal module

func NewSignalModule

func NewSignalModule() *SignalModule

Alloc memory for signal module

func (*SignalModule) Exit

func (s *SignalModule) Exit()

Start signal daemon routine

func (*SignalModule) InitSignalModule

func (s *SignalModule) InitSignalModule()

Start signal daemon routine

func (*SignalModule) RegisterSignalCallback

func (s *SignalModule) RegisterSignalCallback(
	sig os.Signal, f func(interface{}) *cm.ControlMsg, d interface{})

Register signal handler to module Register to the same signal would be executed according the register sequence

Jump to

Keyboard shortcuts

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