Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SIGNIL os.Signal = new(NilSignal)
SIGNIL is the nil signal.
View Source
var SignalLookup = map[string]os.Signal{ "SIGABRT": syscall.SIGABRT, "SIGALRM": syscall.SIGALRM, "SIGBUS": syscall.SIGBUS, "SIGCHLD": syscall.SIGCHLD, "SIGCONT": syscall.SIGCONT, "SIGFPE": syscall.SIGFPE, "SIGHUP": syscall.SIGHUP, "SIGILL": syscall.SIGILL, "SIGINT": syscall.SIGINT, "SIGIO": syscall.SIGIO, "SIGIOT": syscall.SIGIOT, "SIGKILL": syscall.SIGKILL, "SIGPIPE": syscall.SIGPIPE, "SIGPROF": syscall.SIGPROF, "SIGQUIT": syscall.SIGQUIT, "SIGSEGV": syscall.SIGSEGV, "SIGSTOP": syscall.SIGSTOP, "SIGSYS": syscall.SIGSYS, "SIGTERM": syscall.SIGTERM, "SIGTRAP": syscall.SIGTRAP, "SIGTSTP": syscall.SIGTSTP, "SIGTTIN": syscall.SIGTTIN, "SIGTTOU": syscall.SIGTTOU, "SIGURG": syscall.SIGURG, "SIGUSR1": syscall.SIGUSR1, "SIGUSR2": syscall.SIGUSR2, "SIGXCPU": syscall.SIGXCPU, "SIGXFSZ": syscall.SIGXFSZ, }
View Source
var ValidSignals []string
ValidSignals is the list of all valid signals. This is built at runtime because it is OS-dependent.
Functions ¶
func Parse ¶
Parse parses the given string as a signal. If the signal is not found, an error is returned.
func StringToSignalFunc ¶
func StringToSignalFunc() mapstructure.DecodeHookFunc
StringToSignalFunc parses a string as a signal based on the signal lookup table. If the user supplied an empty string or nil, a special "nil signal" is returned. Clients should check for this value and set the response back nil after mapstructure finishes parsing.
Types ¶
Click to show internal directories.
Click to hide internal directories.