Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Struct that represents a container. It contains a pointer for the docker-defined structure and a list of labels. Generating []Label dynamically after the container started doesn't seem to be a reliable method, since it causes some tests to fail ( see container_result_test.go/TestItShouldReturnRightContainers). The labels are then cached without relying on the Docker struct.
func (*Container) RawContainerDefinition ¶
Getter method to return the original docker container structure
type ContainerResult ¶
type ContainerResult interface { Result Containers() []Container Filter( filter func(container *Container) *Container) (ContainerResult, error) }
Represents the result for a container search. It allows to get the list of containers found and to filter them
func NewContainerResult ¶
func NewContainerResult(toEncapsulate []types.Container) ContainerResult
Returns a new ContainerResult object from a list of Docker Container types
type Label ¶
type Label struct {
// contains filtered or unexported fields
}
A label represent a pair of two strings: one identifying the label itself, the other assigning a value to the label
type LabelResult ¶
type LabelResult interface { Result Labels() []Label Filter(filter func(label *Label) *Label) (LabelResult, error) }
A result is the competition of a listing or filtering operation
func NewLabelResult ¶
func NewLabelResult(toStructure map[string]string) LabelResult
Converts the data returned by the Docker library into a LabelResult struct, that can be used to filter the labels or to perform more complex operations