grace

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 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 GetAllLisenFiles

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

GetAllLisenFiles returns all listen files

func GraceHandler

func GraceHandler(userFunc, stopFunc handlerFunc)

GraceHandler set the signle handler for grace restart

func SignalUSR2

func SignalUSR2(pid int)

GraceHandler 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