Versions in this module Expand all Collapse all v0 v0.9.0 Jun 15, 2015 Changes in this version + var DefaultContainerNameFunc = func(s string) string + var ErrInvalidRepo = errors.New("registry: not a valid docker repo") + var RepoPattern = regexp.MustCompile(`(\S+\/)?(\S+\/\S+):(\S+)`) + func Decode(r *http.Request, v interface{}) error + func Encode(w http.ResponseWriter, v interface{}) error + func Error(w http.ResponseWriter, err error, status int) error + func NewDockerManager(socket, certPath string, auth *docker.AuthConfigurations) (*dockerManager, error) + func NewHTTPHandler(r *Relay) http.Handler + func NewTCPHandler(r *Relay) tcp.Handler + type Container struct + Attach bool + AttachURL string + Command string + Env map[string]string + Image string + Name string + State string + type ContainerManager interface + Attach func(string, io.Reader, io.Writer) error + Create func(*Container) error + Pull func(*Container) error + Remove func(string) error + Start func(string) error + Stop func(string) error + Wait func(string) (int, error) + type DockerOptions struct + Auth *docker.AuthConfigurations + CertPath string + Organization string + Socket string + type ErrorResource struct + ID string + Message string + Status int + URL string + func (e *ErrorResource) Error() string + type Options struct + ContainerNameFunc func(string) string + Docker DockerOptions + Tcp TcpOptions + type PostContainers struct + func (h *PostContainers) ServeHTTPContext(ctx context.Context, w http.ResponseWriter, r *http.Request) error + type PostContainersForm struct + Attach bool + Command string + Env map[string]string + Image string + User string + type Relay struct + Host string + func New(options Options) *Relay + func (r *Relay) AttachToContainer(ctx context.Context, name string, in io.Reader, out io.Writer) error + func (r *Relay) CreateContainer(ctx context.Context, c *Container) error + func (r *Relay) GenContainerName(s string) string + func (r *Relay) PurgeContainer(ctx context.Context, name string) (err error) + func (r *Relay) RegisterContainer(name string, c *Container) + func (r *Relay) StartContainer(ctx context.Context, name string) error + func (r *Relay) UnregisterContainer(name string) + func (r *Relay) WaitContainer(ctx context.Context, name string) (int, error) + type TcpOptions struct + Host string + Port string