Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsClosedErr ¶
IsClosedErr is a helper function to check for "already closed" errors, which are usually harmless but still show up in logs, code adapted from https://stackoverflow.com/questions/44974984/how-to-check-a-net-conn-is-closed
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint is a pair of an IP prefix and a port range.
func ParseEndpoint ¶
ParseEndpoint parses an endpoint from the canonical format: "<IP>[optional slash and prefix length]:<minPort-maxPort)."
type FileConnAddr ¶
FileConnAddr is the net.Addr of a conn backed by an os.File (the stdin/stdout pair of a STDIN listener).
func (*FileConnAddr) Network ¶
func (s *FileConnAddr) Network() string
func (*FileConnAddr) String ¶
func (s *FileConnAddr) String() string
type StdioListener ¶
type StdioListener struct {
// contains filtered or unexported fields
}
StdioListener is the one-shot listener of a STDIN listener: it accepts a single conn, the process stdin/stdout pair. EOF on stdin ends the flow. The process owns stdio: closing the listener or the conn leaves it alone.
func NewStdioListener ¶
func NewStdioListener() *StdioListener
NewStdioListener creates the listener of the process stdin/stdout pair.
func (*StdioListener) Addr ¶
func (l *StdioListener) Addr() net.Addr
func (*StdioListener) Close ¶
func (l *StdioListener) Close() error