Documentation ¶
Index ¶
- type EnvVar
- type PortMapping
- type Service
- func (service *Service) CreateContainer(connText *context.Context) (containerID string)
- func (service *Service) GetContainerName() (containerName string)
- func (service *Service) GetImageName() (imageName string)
- func (service *Service) GetVolumeName() (volumeName string)
- func (service *Service) ShowPrompt()
- type VolumeMount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PortMapping ¶
PortMapping represents a single port mapping for a container.
type Service ¶
type Service struct { Tag string Name string Image string Volumes []VolumeMount PortMappings []PortMapping Env []EnvVar Command []string }
Service describes the properties and methods for a service like MySQL or Redis. All the available services in tent uses this struct as their type.
func (*Service) CreateContainer ¶
CreateContainer method creates a new container with using a given image pulled by PullImage method.
func (*Service) GetContainerName ¶
GetContainerName method generates unique name for each container by combining their image tag and exposed port number.
func (*Service) GetImageName ¶
GetImageName method generates full image name for services by combining their image name and tag.
func (*Service) GetVolumeName ¶
GetVolumeName method generates unique name for each volume used by different containers by using their container name.
func (*Service) ShowPrompt ¶
func (service *Service) ShowPrompt()
ShowPrompt method presents user with user friendly prompts.
type VolumeMount ¶ added in v0.0.4
VolumeMount represents a single volume mount for a container.