Documentation ¶
Index ¶
- type DefaultClient
- func (client *DefaultClient) CheckContainerStatus(containerID string) (myContainer.ContainerStatus, error)
- func (client *DefaultClient) GetDockerCPUAndRAM() (int, int)
- func (client *DefaultClient) RemoveContainer(containerID string) error
- func (client *DefaultClient) RunContainer(contConfig caravelaTypes.ContainerConfig) (*caravelaTypes.ContainerStatus, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultClient ¶
type DefaultClient struct {
// contains filtered or unexported fields
}
DefaultClient interfaces with docker SDK.
func NewDockerClient ¶
func NewDockerClient(config *configuration.Configuration) *DefaultClient
NewDockerClient creates a new docker client to interact with the local Docker Engine.
func (*DefaultClient) CheckContainerStatus ¶
func (client *DefaultClient) CheckContainerStatus(containerID string) (myContainer.ContainerStatus, error)
CheckContainerStatus checks the container status (running, stopped, etc)
func (*DefaultClient) GetDockerCPUAndRAM ¶
func (client *DefaultClient) GetDockerCPUAndRAM() (int, int)
Get CPUs and RAM dedicated to Docker engine (Decided by the user in Docker configuration).
func (*DefaultClient) RemoveContainer ¶
func (client *DefaultClient) RemoveContainer(containerID string) error
RemoveContainer removes a container from the Docker engine (to avoid filling space in the node).
func (*DefaultClient) RunContainer ¶
func (client *DefaultClient) RunContainer(contConfig caravelaTypes.ContainerConfig) (*caravelaTypes.ContainerStatus, error)
RunContainer launches a container from an image in the local Docker Engine.
Click to show internal directories.
Click to hide internal directories.