Documentation ¶
Index ¶
- Constants
- func BuildImageName(artifact *ArtifactConfig) string
- func FindAtlasDirectories(dir string) ([]string, error)
- func FindRootDir(cwd string) (string, error)
- type ArtifactConfig
- type ArtifactDependsOn
- type ArtifactRef
- type Atlasfile
- func (a *Atlasfile) GetArtifact(name string) *ArtifactConfig
- func (a *Atlasfile) GetService(name string) *ServiceConfig
- func (a *Atlasfile) GetServiceImage(service *ServiceConfig) (string, error)
- func (a *Atlasfile) GetStack(name string) *StackConfig
- func (a *Atlasfile) GetStacks(stackNames []string) ([]StackConfig, error)
- func (a *Atlasfile) String() string
- type BuildOptions
- type ContainerRestarts
- type PortExpose
- type PortRequest
- type ServiceConfig
- type StackConfig
- type StackService
- type VolumeConfig
Constants ¶
View Source
const ( ContainerRestartsAlways = "always" ContainerRestartsOnFailure = "on-failure" ContainerRestartsUnlessStopped = "unless-stopped" ContainerRestartsNo = "no" )
View Source
const JumpUpLimit = 5
Variables ¶
This section is empty.
Functions ¶
func BuildImageName ¶
func BuildImageName(artifact *ArtifactConfig) string
func FindAtlasDirectories ¶
func FindRootDir ¶
Types ¶
type ArtifactConfig ¶
type ArtifactConfig struct { Name string `json:"name"` Build BuildOptions `json:"build"` DependsOn ArtifactDependsOn `json:"depends_on"` // contains filtered or unexported fields }
func (*ArtifactConfig) GetDirpath ¶
func (ac *ArtifactConfig) GetDirpath() string
GetDirpath returns path of .atlas directory artifact was declared in
type ArtifactDependsOn ¶
type ArtifactRef ¶
type ArtifactRef struct { Name string `json:"name"` Artifact *ArtifactConfig `json:"artifact"` }
type Atlasfile ¶
type Atlasfile struct { Artifacts []ArtifactConfig `json:"artifacts"` Services []ServiceConfig `json:"services"` Stacks []StackConfig `json:"stacks"` // contains filtered or unexported fields }
func (*Atlasfile) GetArtifact ¶
func (a *Atlasfile) GetArtifact(name string) *ArtifactConfig
func (*Atlasfile) GetService ¶
func (a *Atlasfile) GetService(name string) *ServiceConfig
func (*Atlasfile) GetServiceImage ¶
func (a *Atlasfile) GetServiceImage(service *ServiceConfig) (string, error)
func (*Atlasfile) GetStack ¶
func (a *Atlasfile) GetStack(name string) *StackConfig
type BuildOptions ¶
type ContainerRestarts ¶
type ContainerRestarts string
type PortExpose ¶
type PortRequest ¶
type PortRequest struct { ContainerPort int `json:"containerPort"` Protocol string `json:"protocol"` }
func GetServicePort ¶
func GetServicePort(requests []PortRequest, port int) *PortRequest
type ServiceConfig ¶
type ServiceConfig struct { Name string `json:"name"` Artifact *ArtifactRef `json:"artifact"` Image string `json:"image"` Entrypoint []string `json:"entrypoint"` Command []string `json:"command"` Ports []PortRequest `json:"port_requests"` Environment map[string]string `json:"environment"` EnvironmentFiles []string `json:"environment_files"` Volumes []VolumeConfig `json:"volumes"` Restart ContainerRestarts `json:"restart"` Interactive bool `json:"interactive"` TTY bool `json:"tty"` // contains filtered or unexported fields }
func (*ServiceConfig) GetDirpath ¶
func (s *ServiceConfig) GetDirpath() string
GetDirpath returns path of .atlas directory service was declared in
type StackConfig ¶
type StackConfig struct { Name string `json:"name"` Services []StackService `json:"services"` // contains filtered or unexported fields }
func (*StackConfig) GetContainerName ¶
func (s *StackConfig) GetContainerName(service string) string
func (*StackConfig) GetService ¶
func (s *StackConfig) GetService(serviceName string) *StackService
func (*StackConfig) SetContainerName ¶
func (s *StackConfig) SetContainerName(service, containerName string)
type StackService ¶
type StackService struct { Name string `json:"name"` ServiceName string `json:"serviceName"` // Environment overwrites environment variables specified in ServiceConfig.Environment and ServiceConfig.EnvironmentFiles Environment map[string]string `json:"environment"` JoinStackNetworks []string `json:"joinStackNetworks"` ExposePorts []PortExpose `json:"exposePorts"` // LocalEnvironment specifies variables that overwrite Environment, ServiceConfig.Environment and ServiceConfig.EnvironmentFiles // when running atlas env (usually URLs that should be rewritten to localhost when running a service outside of Docker) LocalEnvironment map[string]string `json:"localEnvironment"` }
type VolumeConfig ¶
type VolumeConfig struct { IsVolume bool `json:"isVolume"` HostPathOrVolumeName string `json:"hostPath"` ContainerPath string `json:"containerPath"` }
func (*VolumeConfig) GetVolumeNameOrHostPath ¶
func (c *VolumeConfig) GetVolumeNameOrHostPath(cwd string, physicalVolName string) string
Click to show internal directories.
Click to hide internal directories.