Documentation ¶
Overview ¶
Net utilities - there's quite a lot of ceremony setting up a unix socket in a robust way.
Index ¶
- func CancelableListen(ctx context.Context, listener net.Listener, listen func() error, ...) error
- func CancelableServe(ctx context.Context, listener net.Listener, serve func(conn net.Conn)) error
- func ListenUnixAllowEveryone(ctx context.Context, sockPath string, with func(net.Listener) error) error
- func ListenUnixAllowOwner(ctx context.Context, sockPath string, with func(net.Listener) error) error
- func ListenUnixAllowOwnerAndGroup(ctx context.Context, sockPath string, with func(net.Listener) error) error
- func ListenUnixWithMode(ctx context.Context, sockPath string, mode *os.FileMode, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CancelableListen ¶
func CancelableListen( ctx context.Context, listener net.Listener, listen func() error, logger *log.Logger, ) error
wraps use of net.Listener with context cancellation. ignores listen error if context was canceled (Accept()-related errors are expected then)
func CancelableServe ¶
*serve* is called on a separate goroutine
func ListenUnixAllowEveryone ¶
func ListenUnixAllowOwner ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.