package sockets
import "github.com/docker/go-connections/sockets"
Package sockets provides helper functions to create and configure Unix or TCP sockets.
Index ¶
- func ConfigureTCPTransport(tr *http.Transport, proto, addr string)
- func NewTCPSocket(addr string, tlsConfig *tls.Config) (net.Listener, error)
- func NewUnixSocket(path, group string) (net.Listener, error)
Functions ¶
func ConfigureTCPTransport ¶
ConfigureTCPTransport configures the specified Transport according to the specified proto and addr. If the proto is unix (using a unix socket to communicate) the compression is disabled.
func NewTCPSocket ¶
NewTCPSocket creates a TCP socket listener with the specified address and and the specified tls configuration. If TLSConfig is set, will encapsulate the TCP listener inside a TLS one.
func NewUnixSocket ¶
NewUnixSocket creates a unix socket with the specified path and group.
Source Files ¶
- Version
- v0.1.2
- Published
- Dec 22, 2015
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 2 hours ago –
Tools for package owners.