Documentation
¶
Index ¶
- type Command
- type Config
- type CustomHealthCheck
- type Deploy
- type DeploymentMode
- type DockerProxyConfig
- type DockerProxyPermission
- type DockerProxyPermissionType
- type Docs
- type DocsVariable
- type DocsVariableOptionType
- type DocsVariableType
- type KeyValuePair
- type Resources
- type ResourcesLimits
- type ResourcesReservations
- type Service
- type Stack
- type Volume
- type VolumeList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Content string `yaml:"content"` Uid uint `yaml:"uid"` Gid uint `yaml:"gid"` MountingPath string `yaml:"mounting_path"` }
Config for the service
type CustomHealthCheck ¶
type CustomHealthCheck struct { Enabled bool `yaml:"enabled"` TestCommand string `yaml:"test_command"` IntervalSeconds uint64 `yaml:"interval_seconds"` // Time between running the check in seconds TimeoutSeconds uint64 `yaml:"timeout_seconds"` // Maximum time to allow one check to run in seconds StartPeriodSeconds uint64 `yaml:"start_period_seconds"` // Start period for the container to initialize before counting retries towards unstable StartIntervalSeconds uint64 `yaml:"start_interval_seconds"` // Time between running the check during the start period Retries uint64 `yaml:"retries"` // Consecutive failures needed to report unhealthy }
type Deploy ¶
type Deploy struct { Mode DeploymentMode `yaml:"mode"` Replicas uint `yaml:"replicas"` Resources Resources `yaml:"resources"` }
type DeploymentMode ¶
type DeploymentMode string
DeploymentMode mode of deployment of application (replicated or global)
const ( DeploymentModeReplicated DeploymentMode = "replicated" DeploymentModeGlobal DeploymentMode = "global" DeploymentModeNone DeploymentMode = "" )
type DockerProxyConfig ¶
type DockerProxyConfig struct { Enabled bool `yaml:"enabled"` Permission DockerProxyPermission `yaml:"permissions"` }
DockerProxyConfig is the configuration for the docker proxy
type DockerProxyPermission ¶
type DockerProxyPermission struct { Ping DockerProxyPermissionType `yaml:"ping"` Version DockerProxyPermissionType `yaml:"version"` Info DockerProxyPermissionType `yaml:"info"` Events DockerProxyPermissionType `yaml:"events"` Auth DockerProxyPermissionType `yaml:"auth"` Secrets DockerProxyPermissionType `yaml:"secrets"` Build DockerProxyPermissionType `yaml:"build"` Commit DockerProxyPermissionType `yaml:"commit"` Configs DockerProxyPermissionType `yaml:"configs"` Containers DockerProxyPermissionType `yaml:"containers"` Distribution DockerProxyPermissionType `yaml:"distribution"` Exec DockerProxyPermissionType `yaml:"exec"` Grpc DockerProxyPermissionType `yaml:"grpc"` Images DockerProxyPermissionType `yaml:"images"` Networks DockerProxyPermissionType `yaml:"networks"` Nodes DockerProxyPermissionType `yaml:"nodes"` Plugins DockerProxyPermissionType `yaml:"plugins"` Services DockerProxyPermissionType `yaml:"services"` Session DockerProxyPermissionType `yaml:"session"` Swarm DockerProxyPermissionType `yaml:"swarm"` System DockerProxyPermissionType `yaml:"system"` Tasks DockerProxyPermissionType `yaml:"tasks"` Volumes DockerProxyPermissionType `yaml:"volumes"` }
type DockerProxyPermissionType ¶
type DockerProxyPermissionType string
DockerProxyPermissionType is the type of permission to be granted to the proxy
const ( // DockerProxyNoPermission no request will be allowed DockerProxyNoPermission DockerProxyPermissionType = "none" // DockerProxyReadPermission only [GET, HEAD] requests will be allowed DockerProxyReadPermission DockerProxyPermissionType = "read" // DockerProxyReadWritePermission all requests will be allowed [GET, HEAD, POST, PUT, DELETE, OPTIONS] DockerProxyReadWritePermission DockerProxyPermissionType = "read_write" )
type Docs ¶
type Docs struct { LogoURL string `yaml:"logo_url"` Name string `yaml:"name"` Description string `yaml:"description"` ReadmeDescription string `yaml:"readme_description"` IframeVideoEmbed string `yaml:"iframe_video_embed"` Variables map[string]DocsVariable `yaml:"variables"` }
Docs for the stack
type DocsVariable ¶
type DocsVariable struct { Title string `yaml:"title"` Description string `yaml:"description"` Default string `yaml:"default"` Type DocsVariableType `yaml:"type"` Options []DocsVariableOptionType `yaml:"options"` }
type DocsVariableOptionType ¶
type DocsVariableType ¶
type DocsVariableType string
const ( DocsVariableTypeText DocsVariableType = "text" DocsVariableTypeInteger DocsVariableType = "integer" DocsVariableTypeFloat DocsVariableType = "float" DocsVariableTypeOptions DocsVariableType = "options" DocsVariableTypeVolume DocsVariableType = "volume" DocsVariableTypeApplication DocsVariableType = "application" DocsVariableTypeServer DocsVariableType = "server" DocsVariableTypeMarkdown DocsVariableType = "markdown" )
type KeyValuePair ¶
KeyValuePair Generic key-value pair Support both map and slice of strings (key=value) formats
func (*KeyValuePair) UnmarshalYAML ¶
func (p *KeyValuePair) UnmarshalYAML(unmarshal func(interface{}) error) error
type Resources ¶
type Resources struct { Limits ResourcesLimits `yaml:"limits"` Reservations ResourcesReservations `yaml:"reservations"` }
Resources for the service
type ResourcesLimits ¶
type ResourcesLimits struct {
MemoryMB int `yaml:"memory"`
}
type ResourcesReservations ¶
type ResourcesReservations struct {
MemoryMB int `yaml:"memory"`
}
type Service ¶
type Service struct { Image string `yaml:"image"` Deploy Deploy `yaml:"deploy"` Volumes VolumeList `yaml:"volumes"` Environment KeyValuePair `yaml:"environment"` CapAdd []string `yaml:"cap_add"` Sysctls KeyValuePair `yaml:"sysctls"` Hostname string `yaml:"hostname"` Command Command `yaml:"command"` Configs []Config `yaml:"configs"` CustomHealthCheck CustomHealthCheck `yaml:"custom_health_check"` PreferredServerHostnames []string `yaml:"preferred_server_hostnames"` DockerProxyConfig DockerProxyConfig `yaml:"docker_proxy_config"` }
func (*Service) ValidateDockerProxyConfig ¶
type Stack ¶
type Stack struct { MinimumSwiftwaveVersion string `yaml:"minimum_swiftwave_version"` Services map[string]Service `yaml:"services"` Docs *Docs `yaml:"docs"` }
Stack Stack definition
func ParseStackYaml ¶
func (*Stack) FillAndVerifyVariables ¶
func (s *Stack) FillAndVerifyVariables(variableMapping *map[string]string, serviceManager service_manager.ServiceManager) (*Stack, error)
func (*Stack) PreferredServerHostnames ¶
func (*Stack) ServiceNames ¶
func (*Stack) VolumeNames ¶
type Volume ¶
func (Volume) MarshalYAML ¶
type VolumeList ¶
type VolumeList []Volume
VolumeList List of volumes
func (*VolumeList) UnmarshalYAML ¶
func (l *VolumeList) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.