normal

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddInheritedFunc

func AddInheritedFunc(fn func([]net.Listener, map[string]string))

AddInheritedFunc 平滑重启的时候,会回调该方法,保存fd列表

func Append

func Append(ln net.Listener) error

Append 追加监听句柄到活跃列表

func GetInheritedFunc

func GetInheritedFunc(fn func() []int)

GetInheritedFunc 如果是平滑重启,可以获取到从父进程继承过来的fd列表

func Listen

func Listen(nett, addr string) (net.Listener, error)

Listen 监听

func ListenTCP

func ListenTCP(nett string, addr *net.TCPAddr) (*net.TCPListener, error)

ListenTCP 监听tcp协议

func ListenUnix

func ListenUnix(nett string, addr *net.UnixAddr) (*net.UnixListener, error)

ListenUnix 监听unix协议

func SetInherited

func SetInherited() error

SetInherited 添加files列表到环境变量,让子进程继承, 1. 只有在reboot使用 2. 不支持windows系统

Types

This section is empty.

Jump to

Keyboard shortcuts

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