Documentation ¶
Index ¶
- type DockerRuntime
- func (c *DockerRuntime) Config() runtime.RuntimeConfig
- func (c *DockerRuntime) CreateContainer(ctx context.Context, node *types.NodeConfig) (interface{}, error)
- func (c *DockerRuntime) CreateNet(ctx context.Context) (err error)
- func (c *DockerRuntime) DeleteContainer(ctx context.Context, containerID string) error
- func (c *DockerRuntime) DeleteNet(ctx context.Context) (err error)
- func (c *DockerRuntime) Exec(ctx context.Context, id string, cmd []string) ([]byte, []byte, error)
- func (c *DockerRuntime) ExecNotWait(ctx context.Context, id string, cmd []string) error
- func (c *DockerRuntime) GetContainer(ctx context.Context, containerID string) (*types.GenericContainer, error)
- func (c *DockerRuntime) GetNSPath(ctx context.Context, containerId string) (string, error)
- func (c *DockerRuntime) GetName() string
- func (c *DockerRuntime) Init(opts ...runtime.RuntimeOption) error
- func (c *DockerRuntime) ListContainers(ctx context.Context, gfilters []*types.GenericFilter) ([]types.GenericContainer, error)
- func (c *DockerRuntime) PullImageIfRequired(ctx context.Context, imageName string) error
- func (c *DockerRuntime) StartContainer(ctx context.Context, id string) error
- func (c *DockerRuntime) StopContainer(ctx context.Context, name string) error
- func (c *DockerRuntime) WithConfig(cfg *runtime.RuntimeConfig)
- func (c *DockerRuntime) WithKeepMgmtNet()
- func (c *DockerRuntime) WithMgmtNet(n *types.MgmtNet)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerRuntime ¶
type DockerRuntime struct { Client *dockerC.Client Mgmt *types.MgmtNet // contains filtered or unexported fields }
func (*DockerRuntime) Config ¶ added in v0.15.0
func (c *DockerRuntime) Config() runtime.RuntimeConfig
func (*DockerRuntime) CreateContainer ¶
func (c *DockerRuntime) CreateContainer(ctx context.Context, node *types.NodeConfig) (interface{}, error)
CreateContainer creates a docker container
func (*DockerRuntime) CreateNet ¶
func (c *DockerRuntime) CreateNet(ctx context.Context) (err error)
CreateDockerNet creates a docker network or reusing if it exists
func (*DockerRuntime) DeleteContainer ¶
func (c *DockerRuntime) DeleteContainer(ctx context.Context, containerID string) error
DeleteContainer tries to stop a container then remove it
func (*DockerRuntime) DeleteNet ¶
func (c *DockerRuntime) DeleteNet(ctx context.Context) (err error)
DeleteNet deletes a docker bridge
func (*DockerRuntime) Exec ¶
Exec executes cmd on container identified with id and returns stdout, stderr bytes and an error
func (*DockerRuntime) ExecNotWait ¶
ExecNotWait executes cmd on container identified with id but doesn't wait for output nor attaches stodout/err
func (*DockerRuntime) GetContainer ¶ added in v0.15.0
func (c *DockerRuntime) GetContainer(ctx context.Context, containerID string) (*types.GenericContainer, error)
func (*DockerRuntime) GetNSPath ¶
GetNSPath inspects a container by its name/id and returns an netns path using the pid of a container
func (*DockerRuntime) GetName ¶ added in v0.15.0
func (c *DockerRuntime) GetName() string
func (*DockerRuntime) Init ¶ added in v0.15.0
func (c *DockerRuntime) Init(opts ...runtime.RuntimeOption) error
func (*DockerRuntime) ListContainers ¶
func (c *DockerRuntime) ListContainers(ctx context.Context, gfilters []*types.GenericFilter) ([]types.GenericContainer, error)
ListContainers lists all containers with labels []string
func (*DockerRuntime) PullImageIfRequired ¶
func (c *DockerRuntime) PullImageIfRequired(ctx context.Context, imageName string) error
func (*DockerRuntime) StartContainer ¶
func (c *DockerRuntime) StartContainer(ctx context.Context, id string) error
StartContainer starts a docker container
func (*DockerRuntime) StopContainer ¶
func (c *DockerRuntime) StopContainer(ctx context.Context, name string) error
func (*DockerRuntime) WithConfig ¶ added in v0.15.0
func (c *DockerRuntime) WithConfig(cfg *runtime.RuntimeConfig)
func (*DockerRuntime) WithKeepMgmtNet ¶ added in v0.15.0
func (c *DockerRuntime) WithKeepMgmtNet()
func (*DockerRuntime) WithMgmtNet ¶ added in v0.15.0
func (c *DockerRuntime) WithMgmtNet(n *types.MgmtNet)
Click to show internal directories.
Click to hide internal directories.