Documentation ¶
Index ¶
- Constants
- func NewClient(instance *types.Instance, proxyHost string) (*client.Client, error)
- func NewDocker(c *client.Client) *docker
- func NewLocalCachedFactory(s storage.StorageApi) *localCachedFactory
- type CreateContainerOpts
- type DockerApi
- type FactoryApi
- type FactoryMock
- type Mock
- func (m *Mock) ConfigCreate(name string, labels map[string]string, data []byte) error
- func (m *Mock) ConfigDelete(name string) error
- func (m *Mock) ContainerCreate(opts CreateContainerOpts) error
- func (m *Mock) ContainerDelete(id string) error
- func (m *Mock) ContainerIPs(id string) (map[string]string, error)
- func (m *Mock) ContainerRename(old, new string) error
- func (m *Mock) ContainerResize(name string, rows, cols uint) error
- func (m *Mock) ContainerStats(name string) (io.ReadCloser, error)
- func (m *Mock) CopyFromContainer(containerName, filePath string) (io.Reader, error)
- func (m *Mock) CopyToContainer(containerName, destination, fileName string, content io.Reader) error
- func (m *Mock) CreateAttachConnection(name string) (net.Conn, error)
- func (m *Mock) DaemonHost() string
- func (m *Mock) DaemonInfo() (types.Info, error)
- func (m *Mock) Exec(instanceName string, command []string) (int, error)
- func (m *Mock) ExecAttach(instanceName string, command []string, out io.Writer) (int, error)
- func (m *Mock) GetClient() *client.Client
- func (m *Mock) GetPorts() ([]uint16, error)
- func (m *Mock) GetSwarmPorts() ([]string, []uint16, error)
- func (m *Mock) NetworkConnect(container, network, ip string) (string, error)
- func (m *Mock) NetworkCreate(id string, opts types.NetworkCreate) error
- func (m *Mock) NetworkDelete(id string) error
- func (m *Mock) NetworkDisconnect(containerId, networkId string) error
- func (m *Mock) NetworkInspect(id string) (types.NetworkResource, error)
- func (m *Mock) SwarmInit(advertiseAddr string) (*SwarmTokens, error)
- func (m *Mock) SwarmJoin(addr, token string) error
- type MockConn
- func (m *MockConn) Close() error
- func (m *MockConn) LocalAddr() net.Addr
- func (m *MockConn) Read(b []byte) (n int, err error)
- func (m *MockConn) RemoteAddr() net.Addr
- func (m *MockConn) SetDeadline(t time.Time) error
- func (m *MockConn) SetReadDeadline(t time.Time) error
- func (m *MockConn) SetWriteDeadline(t time.Time) error
- func (m *MockConn) Write(b []byte) (n int, err error)
- type SwarmTokens
Constants ¶
View Source
const ( Byte = 1 Kilobyte = 1024 * Byte Megabyte = 1024 * Kilobyte )
Variables ¶
This section is empty.
Functions ¶
func NewLocalCachedFactory ¶
func NewLocalCachedFactory(s storage.StorageApi) *localCachedFactory
Types ¶
type CreateContainerOpts ¶
type DockerApi ¶
type DockerApi interface { GetClient() *client.Client NetworkCreate(id string, opts types.NetworkCreate) error NetworkConnect(container, network, ip string) (string, error) NetworkInspect(id string) (types.NetworkResource, error) NetworkDelete(id string) error NetworkDisconnect(containerId, networkId string) error DaemonInfo() (types.Info, error) DaemonHost() string GetSwarmPorts() ([]string, []uint16, error) GetPorts() ([]uint16, error) ContainerStats(name string) (io.ReadCloser, error) ContainerResize(name string, rows, cols uint) error ContainerRename(old, new string) error ContainerDelete(name string) error ContainerCreate(opts CreateContainerOpts) error ContainerIPs(id string) (map[string]string, error) ExecAttach(instanceName string, command []string, out io.Writer) (int, error) Exec(instanceName string, command []string) (int, error) CreateAttachConnection(name string) (net.Conn, error) CopyToContainer(containerName, destination, fileName string, content io.Reader) error CopyFromContainer(containerName, filePath string) (io.Reader, error) SwarmInit(advertiseAddr string) (*SwarmTokens, error) SwarmJoin(addr, token string) error ConfigCreate(name string, labels map[string]string, data []byte) error ConfigDelete(name string) error }
type FactoryApi ¶
type FactoryMock ¶
func (*FactoryMock) GetForInstance ¶
func (m *FactoryMock) GetForInstance(instance *types.Instance) (DockerApi, error)
func (*FactoryMock) GetForSession ¶
func (m *FactoryMock) GetForSession(session *types.Session) (DockerApi, error)
type Mock ¶
func (*Mock) ConfigCreate ¶
func (*Mock) ConfigDelete ¶
func (*Mock) ContainerCreate ¶
func (m *Mock) ContainerCreate(opts CreateContainerOpts) error
func (*Mock) ContainerDelete ¶
func (*Mock) ContainerRename ¶
func (*Mock) ContainerStats ¶
func (m *Mock) ContainerStats(name string) (io.ReadCloser, error)
func (*Mock) CopyFromContainer ¶
func (*Mock) CopyToContainer ¶
func (*Mock) CreateAttachConnection ¶
func (*Mock) DaemonHost ¶
func (*Mock) ExecAttach ¶
func (*Mock) NetworkConnect ¶
func (*Mock) NetworkCreate ¶
func (m *Mock) NetworkCreate(id string, opts types.NetworkCreate) error
func (*Mock) NetworkDelete ¶
func (*Mock) NetworkDisconnect ¶
func (*Mock) NetworkInspect ¶
func (m *Mock) NetworkInspect(id string) (types.NetworkResource, error)
type SwarmTokens ¶
Click to show internal directories.
Click to hide internal directories.