Documentation ¶
Index ¶
- func ExitWithMessages(msg ...interface{})
- func GetBool(arg docopt.Opts, key string) bool
- func GetInt64(arg docopt.Opts, key string) int64
- func GetSliceString(arg docopt.Opts, key string) []string
- func GetString(arg docopt.Opts, key string) string
- func NewListener(addr string, readTimeout, writeTimeout time.Duration) (net.Listener, error)
- func NewUnixListener(path string, readTimeout, writeTimeout time.Duration) (net.Listener, error)
- type Conn
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExitWithMessages ¶
func ExitWithMessages(msg ...interface{})
func GetSliceString ¶
func NewListener ¶
func NewUnixListener ¶
Binds to a UNIX socket. If the file already exists, try to remove it before binding again. This logic is borrowed from Gunicorn (see https://github.com/benoitc/gunicorn/blob/a8963ef1a5a76f3df75ce477b55fe0297e3b617d/gunicorn/sock.py#L106)
Types ¶
type Conn ¶
type Conn struct { net.Conn ReadTimeout time.Duration WriteTimeout time.Duration // contains filtered or unexported fields }
Conn wraps a net.Conn, and sets a deadline for every read and write operation.
type Listener ¶
Listener wraps a net.Listener, and gives a place to store the timeout parameters. On Accept, it will wrap the net.Conn with our own Conn for us. Original implementation taken from https://gist.github.com/jbardin/9663312 Thanks! <3
Click to show internal directories.
Click to hide internal directories.