Documentation
¶
Overview ¶
Package transform is for representing groups of docker containers in transition between various formats
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildContext ¶
BuildContext is an intermediary representation for build information
type Container ¶
type Container struct {
Build *BuildContext
Command string
CPU int // out of 1024
DNS []string
Domain []string
Entrypoint string
EnvFile []string
Environment map[string]string
Essential bool
Expose []int
Fetch []*Fetch // TODO make a struct
HealthChecks []*HealthCheck // TODO make a struct
Hostname string
Image string
Labels map[string]string
Links []string
Logging *Logging
Memory int // in bytes
Name string
Network []string
NetworkMode string
Pid string
PortMappings *PortMappings
Privileged bool
PullImagePolicy string
Replicas int
StopSignal string
User string
Volumes *IntermediateVolumes
VolumesFrom []string // todo make a struct
WorkDir string
}
Container represents the intermediate format in between input and output formats
type Containers ¶
type Containers []Container
Containers is for storing and sorting slices of Container
func (Containers) Len ¶
func (cs Containers) Len() int
func (Containers) Less ¶
func (cs Containers) Less(i, j int) bool
func (Containers) Swap ¶
func (cs Containers) Swap(i, j int)
type Fetch ¶
type Fetch struct {
URI string
}
Fetch is an intermediate representation for fetching information
type HealthCheck ¶
type HealthCheck struct {
Exec string
HTTPPath string
Port int
Host string
Scheme string
Headers map[string]string
Interval int
Timeout int
FailureThreshold int
}
HealthCheck is an intermediate representation for health check information
type InputFormat ¶
type InputFormat interface {
IngestContainers(input io.ReadCloser) (*PodData, error)
}
InputFormat is an interface for other container formats to ingest containers
type IntermediateVolume ¶
IntermediateVolume is an intermediate representation for volume information
type IntermediateVolumes ¶
type IntermediateVolumes []IntermediateVolume
IntermediateVolumes is a composite type for slices of IntermediateVolume
func (IntermediateVolumes) Len ¶
func (iv IntermediateVolumes) Len() int
func (IntermediateVolumes) Less ¶
func (iv IntermediateVolumes) Less(i, j int) bool
func (IntermediateVolumes) Swap ¶
func (iv IntermediateVolumes) Swap(i, j int)
type OutputFormat ¶
OutputFormat is an interface for other container formats to emit containers
type PodData ¶
type PodData struct {
Name string
Containers *Containers
GlobalLabels map[string]string
HostNetwork bool
HostPID bool
Replicas int
}
PodData is the intermediary between each container format
type PortMapping ¶
type PortMapping struct {
HostIP string
HostPort int
ContainerIP string
ContainerPort int
Protocol string
Name string
}
PortMapping is an intermediate representation for port mapping information
type PortMappings ¶
type PortMappings []PortMapping
PortMappings is a composite type for slices of PortMapping
func (PortMappings) Len ¶
func (pm PortMappings) Len() int
func (PortMappings) Less ¶
func (pm PortMappings) Less(i, j int) bool
func (PortMappings) Swap ¶
func (pm PortMappings) Swap(i, j int)