grace

package
v1.3.23 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// InheritFdPrefix marks the fd inherited from parent process
	InheritFdPrefix = "LISTEN_FD_INHERIT"
)

Functions

func CreateListener

func CreateListener(proto string, addr string) (net.Listener, error)

CreateListener creates a listener from inherited fd if there is no inherited fd, create a now one.

func CreateUDPConn

func CreateUDPConn(addr string) (*net.UDPConn, error)

CreateUDPConn creates a udp connection from inherited fd if there is no inherited fd, create a now one.

func GetAllListenFiles

func GetAllListenFiles() map[string]*os.File

GetAllListenFiles returns all listen files

func GraceHandler

func GraceHandler(userFunc, stopFunc handlerFunc)

GraceHandler set the signal handler for grace restart

func SignalUSR2

func SignalUSR2(pid int)

SignalUSR2 send signal USR2 to pid

Types

This section is empty.

Jump to

Keyboard shortcuts

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