Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvWorker = "GRACEFUL_WORKER" EnvNumFD = "GRACEFUL_NUMFD" EnvOldWorkerPid = "GRACEFUL_OLD_WORKER_PID" ValWorker = "1" )
constants
Variables ¶
View Source
var (
ErrNoServers = errors.New("no servers")
)
View Source
var (
StartedAt time.Time
)
Functions ¶
Types ¶
type Option ¶
type Option func(o *option)
func WithReloadSignals ¶
WithReloadSignals set reload signals, otherwise, default ones are used
func WithStopSignals ¶
WithStopSignals set stop signals, otherwise, default ones are used
func WithStopTimeout ¶
WithStopTimeout set stop timeout for graceful shutdown
if timeout occurs, running connections will be discard violently.
func WithWatchInterval ¶
WithWatchInterval set watch interval for worker checking master process state
Click to show internal directories.
Click to hide internal directories.