Documentation ¶
Index ¶
- type DockerAgent
- func (a *DockerAgent) BuildStation(imageID string, config agent.StationConfig) error
- func (a *DockerAgent) CreateStationContainer(config agent.StationConfig) error
- func (a *DockerAgent) DeleteImage(imageID string) error
- func (a *DockerAgent) DestroyStationContainer(containerID string) error
- func (a *DockerAgent) DownloadImage(imageID string) error
- func (a *DockerAgent) ImagePresent(imageID string) (bool, error)
- func (a *DockerAgent) RunStationContainer(containerID string, quiet bool) (io.ReadCloser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerAgent ¶
type DockerAgent struct {
// contains filtered or unexported fields
}
DockerAgent models the docker agent and contains the docker client and configuration
func NewDockerAgent ¶
func NewDockerAgent(endpoint, apiversion string) (*DockerAgent, error)
NewDockerAgent creates new docker agent based on an endpoint and a API version
func NewDockerAgentFromEnv ¶
func NewDockerAgentFromEnv() (*DockerAgent, error)
NewDockerAgentFromEnv returns a new docker agent based on the detected docker engine on the system
func (*DockerAgent) BuildStation ¶
func (a *DockerAgent) BuildStation(imageID string, config agent.StationConfig) error
func (*DockerAgent) CreateStationContainer ¶
func (a *DockerAgent) CreateStationContainer(config agent.StationConfig) error
CreateStationContainer creates a new container on the docker runtime based on a station config
func (*DockerAgent) DeleteImage ¶
func (a *DockerAgent) DeleteImage(imageID string) error
DeleteImage deletes an image specified by a imageID
func (*DockerAgent) DestroyStationContainer ¶
func (a *DockerAgent) DestroyStationContainer(containerID string) error
DestroyStationContainer deletes an existing station container by a given id
func (*DockerAgent) DownloadImage ¶
func (a *DockerAgent) DownloadImage(imageID string) error
DownloadImage downloads an image from the official Docker Registry
func (*DockerAgent) ImagePresent ¶
func (a *DockerAgent) ImagePresent(imageID string) (bool, error)
ImagePresent checks if an image is present in the underlying image store (local docker imagedb) and returns true if yes (false if not).
func (*DockerAgent) RunStationContainer ¶
func (a *DockerAgent) RunStationContainer(containerID string, quiet bool) (io.ReadCloser, error)
RunStationContainer runs an existing station container by a given container id. If the quiet flag is false it will return a io.ReadCloser for reading the containers outputs.