Documentation ¶
Overview ¶
container stores objects related to containers
Index ¶
- type Container
- func (container *Container) GetDepChainIPs(projectName string, runningPods rkt.Pods, logger *log.Logger) (map[string][]string, error)
- func (container *Container) Init(containers map[string]*Container, volumes map[string]types.Volume) error
- func (container *Container) Run(configPath string, projectName string, volumes map[string]types.Volume, ...) error
- type Mount
- type Port
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Name string ImageHash string Image string `json:"image"` Environment map[string]string `json:"environment"` Exec string `json:"exec"` StateConditions state.StateConditions `json:"state_conditions"` Mounts []Mount `json:"mounts"` DependsStrings []string `json:"depends_on"` DependsOn map[string]*Container Ports []*Port }
Container stores all the information about a container to operate on
func (*Container) GetDepChainIPs ¶
func (container *Container) GetDepChainIPs(projectName string, runningPods rkt.Pods, logger *log.Logger) (map[string][]string, error)
getDependencyChainIPs will return a map of container name=>IP of each dependency of the container and each of their dependencies
func (*Container) Init ¶
func (container *Container) Init(containers map[string]*Container, volumes map[string]types.Volume) error
Init will do the inital checking of a container to make sure it's viable. We also pull the images. We can also do initial container setup here if we want (though we don't right now)
type Mount ¶
Mount defines a volume that is mounted into a container
func (*Mount) GenerateCommandLine ¶
type Port ¶
type Port struct { rkt.ImageAppPort HostPort int }
Port represents a port that is defined in a container manifest. We ingest all the values even though we only use a few.
func (*Port) GenerateCommandLine ¶
GenerateCommandLine will generate the command line options to use this port
func (*Port) SetHostPort ¶
SetHostPort will get a free port on the host machine and save it as the mapped port. You want to do this as close to the actual running of the command as possible to avoid potential conflicts