Documentation
¶
Overview ¶
Package container is used for creating docker containers using a builder pattern.
Index ¶
- func EnsureImage(controller *controller.Controller, imageName string) error
- func GetLogs(controller *controller.Controller, containerID string) (string, error)
- func Remove(controller *controller.Controller, containerID string) error
- func Start(controller *controller.Controller, containerID string) error
- func Wait(controller *controller.Controller, containerID string, timeLimit time.Duration) (state int64, err error)
- type Builder
- type Container
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureImage ¶ added in v0.4.0
func EnsureImage(controller *controller.Controller, imageName string) error
EnsureImage pulls images from docker hub to make sure in exists
func GetLogs ¶ added in v0.4.0
func GetLogs(controller *controller.Controller, containerID string) (string, error)
GetLogs returns logs of a specific container
func Remove ¶ added in v0.4.0
func Remove(controller *controller.Controller, containerID string) error
Remove deletes a container
func Start ¶ added in v0.4.0
func Start(controller *controller.Controller, containerID string) error
Start starts a container
func Wait ¶ added in v0.4.0
func Wait(controller *controller.Controller, containerID string, timeLimit time.Duration) (state int64, err error)
Wait waits until the container is stopped
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewContainerBuilder ¶
func NewContainerBuilder(controller *controller.Controller) *Builder
Click to show internal directories.
Click to hide internal directories.