Documentation ¶
Overview ¶
Package signal implements a run.GroupService handling incoming unix signals.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { // RefreshCallback is called when a syscall.SIGHUP is received. // If the callback returns an error, the signal handler is stopped. In a // run.Group environment this means the entire run.Group is requested to // stop. RefreshCallback func() error // contains filtered or unexported fields }
Handler implements a unix signal handler as run.GroupService.
func (*Handler) ServeContext ¶ added in v0.2.1
ServeContext implements run.ServiceContext and listens for incoming unix signals. If a callback handler was registered it will be executed if a "SIGHUP" is received. If the callback handler returns an error it will exit in error and initiate Group shutdown if used in a run.Group environment.
Click to show internal directories.
Click to hide internal directories.