Documentation ¶
Overview ¶
Package inherit_net provides a family of Listen functions that either open a fresh connection or provide an inherited connection from when the process was started. The behave like their counterparts in the net package, but transparently provide support for graceful restarts without dropping connections. This is provided in a systemd socket activation compatible form to allow using socket activation.
BUG: Doesn't handle closing of listeners.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Listen ¶
Listen announces on the local network address laddr. The network net must be a stream-oriented network: "tcp", "tcp4", "tcp6", "unix" or "unixpacket". It returns an inherited net.Listener for the matching network and address, or creates a new one using net.Listen.
func ListenTCP ¶
ListenTCP announces on the local network address laddr. The network net must be: "tcp", "tcp4" or "tcp6". It returns an inherited net.Listener for the matching network and address, or creates a new one using net.ListenTCP.
func ListenUnix ¶
ListenUnix announces on the local network address laddr. The network net must be a: "unix" or "unixpacket". It returns an inherited net.Listener for the matching network and address, or creates a new one using net.ListenUnix.
func SetInherited ¶
func SetInherited() error
SetInherited adds the files and envs to be inherited by the new process. NOTE:
Only for reboot! Windows system are not supported!
Types ¶
This section is empty.