Documentation
¶
Index ¶
Constants ¶
View Source
const ( DOCKER_SOCKET = "/var/run/docker.sock" PROXY_SOCKET = "/tmp/doxy.sock" PATTERN_FILE = "/etc/doxy.pattern" )
Variables ¶
View Source
var (
DEFAULT_PATTERNS = []string{
`^/(v\d\.\d+/)?containers(/\w+)?/(json|stats|top)$`,
`^/(v\d\.\d+/)?services(/[0-9a-f]+)?$`,
`^/(v\d\.\d+/)?tasks(/\w+)?$`,
`^/(v\d\.\d+/)?networks(/\w+)?$`,
`^/(v\d\.\d+/)?volumes(/\w+)?$`,
`^/(v\d\.\d+/)?nodes(/\w+)?$`,
`^/(v\d\.\d+/)?info$`,
`^/(v\d\.\d+/)?version$`,
"^/_ping$",
}
)
Functions ¶
func ListenToNewSock ¶
Types ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func NewProxy ¶
func NewProxy(opts ...ProxyOption) Proxy
func (*Proxy) GetOptions ¶ added in v0.1.2
type ProxyOption ¶ added in v0.1.2
type ProxyOption func(*ProxyOptions)
func WithDebugEnabled ¶ added in v0.1.2
func WithDebugEnabled() ProxyOption
func WithDebugValue ¶ added in v0.1.2
func WithDebugValue(d bool) ProxyOption
func WithDockerSocket ¶ added in v0.1.2
func WithDockerSocket(s string) ProxyOption
func WithPattern ¶ added in v0.1.2
func WithPattern(p string) ProxyOption
func WithPatterns ¶ added in v0.1.2
func WithPatterns(p []string) ProxyOption
func WithProxySocket ¶ added in v0.1.2
func WithProxySocket(s string) ProxyOption
type ProxyOptions ¶ added in v0.1.2
type UnixSocket ¶
type UnixSocket struct {
// contains filtered or unexported fields
}
UnixSocket just provides the path, so that I can test it
func NewUnixSocket ¶
func NewUnixSocket(path string) UnixSocket
NewUnixSocket return a socket using the path
type UpStream ¶
type UpStream struct { Name string // contains filtered or unexported fields }
func NewUpstream ¶
NewUpstream returns a new socket (magic)
Click to show internal directories.
Click to hide internal directories.