Documentation ¶
Overview ¶
Package docker defines a proxy for the Docker API.
Summary: Change the internal container state transparently while providing an otherwise unmodified view from the external API.
patch for:
- /start
- /restart
- /unpause
unpatch for:
- /export
- /commit
- /changes // TODO: Unimplemented
- /archive // TODO: Unimplemented
ignore:
- RestartPolicy -> no need to re-patch UNLESS if fail+restart during unpatch
- /exec/start -> no need to re-patch since container must already be started
Index ¶
- type ContainerTruststorePatcher
- type ContainerTruststorePatcherOpts
- type UDSHTTPClient
- func (c *UDSHTTPClient) Do(req *http.Request) (resp *http.Response, err error)
- func (c *UDSHTTPClient) Get(url string) (resp *http.Response, err error)
- func (c *UDSHTTPClient) Head(url string) (resp *http.Response, err error)
- func (c *UDSHTTPClient) Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
- func (c *UDSHTTPClient) PostForm(url string, data url.Values) (resp *http.Response, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerTruststorePatcher ¶
type ContainerTruststorePatcher struct {
// contains filtered or unexported fields
}
ContainerTruststorePatcher provides a Docker API proxy that patches the container truststore while running.
func NewContainerTruststorePatcher ¶
func NewContainerTruststorePatcher(cert x509.Certificate, opts ContainerTruststorePatcherOpts) (*ContainerTruststorePatcher, error)
NewContainerTruststorePatcher creates a new ContainerTruststorePatcher with the provided certificate and options.
func (*ContainerTruststorePatcher) Proxy ¶
func (d *ContainerTruststorePatcher) Proxy(srvAddr, dockerAddr string)
Proxy serves the Docker API while patching the container truststore.
type ContainerTruststorePatcherOpts ¶
type ContainerTruststorePatcherOpts struct { EnvVars []string JavaEnvVar bool RecursiveProxy bool NetworkOverride string }
ContainerTruststorePatcherOpts defines the optional parameters for creating a ContainerTruststorePatcher.
type UDSHTTPClient ¶
UDSHTTPClient is a client that routes all requests to a UNIX Domain Socket.
func NewUDSHTTPClient ¶
func NewUDSHTTPClient(socket string) *UDSHTTPClient
NewUDSHTTPClient returns a new UDS HTTP client.
func (*UDSHTTPClient) Get ¶
func (c *UDSHTTPClient) Get(url string) (resp *http.Response, err error)
Get executes a HTTP GET Request routed through the UDS socket.
func (*UDSHTTPClient) Head ¶
func (c *UDSHTTPClient) Head(url string) (resp *http.Response, err error)
Head executes a HTTP HEAD Request routed through the UDS socket.