Documentation
¶
Index ¶
- type Options
- type Proxy
- func (p *Proxy) AccessDenied(writer http.ResponseWriter, request *http.Request)
- func (p *Proxy) ContainerKill(writer http.ResponseWriter, request *http.Request)
- func (p *Proxy) Guard(allowed bool) http.HandlerFunc
- func (p *Proxy) PassToSocket(writer http.ResponseWriter, request *http.Request)
- func (p *Proxy) Stream(writer http.ResponseWriter, request *http.Request)
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct {
Options
// contains filtered or unexported fields
}
func NewProxy ¶
func NewProxy(opts Options, realSock string, transport http.RoundTripper) *Proxy
NewProxy creates a proxy to the docker socket at realSock; transport overrides the socket connection if not nil.
func (*Proxy) AccessDenied ¶
func (p *Proxy) AccessDenied(writer http.ResponseWriter, request *http.Request)
func (*Proxy) ContainerKill ¶
func (p *Proxy) ContainerKill(writer http.ResponseWriter, request *http.Request)
func (*Proxy) Guard ¶ added in v1.5.0
func (p *Proxy) Guard(allowed bool) http.HandlerFunc
Guard returns a handler that streams the request to the socket if allowed (or AllowAll is set), otherwise denies it.
func (*Proxy) PassToSocket ¶
func (p *Proxy) PassToSocket(writer http.ResponseWriter, request *http.Request)