Documentation ¶
Index ¶
- Constants
- Variables
- type DefaultsSetter
- type Environment
- type Manifest
- func (m *Manifest) Agents() []string
- func (m *Manifest) ApplyDefaults() error
- func (m *Manifest) AttributeSet(name string) bool
- func (m *Manifest) Attributes() []string
- func (m *Manifest) AttributesByPrefix(prefix string) []string
- func (m *Manifest) CombineEnv() error
- func (m *Manifest) Env() map[string]string
- func (m *Manifest) Service(name string) (*Service, error)
- func (m *Manifest) ServiceEnvironment(service string) (map[string]string, error)
- func (m *Manifest) SetAttributes(attrs []string)
- func (m *Manifest) SetEnv(env map[string]string)
- func (m *Manifest) Validate() error
- type NameGetter
- type NameSetter
- type Params
- type Resource
- type Resources
- type Service
- type ServiceAgent
- type ServiceAgentPort
- type ServiceBuild
- type ServiceCommand
- type ServiceDeployment
- type ServiceDomains
- type ServiceHealth
- type ServicePort
- type ServiceScale
- type ServiceScaleCooldown
- type ServiceScaleCount
- type ServiceScaleMetric
- type ServiceScaleMetrics
- type ServiceScaleTargets
- type ServiceTermination
- type Services
- type Timer
- type Timers
Constants ¶
View Source
const (
ValidNameDescription = "must contain only lowercase alphanumeric and dashes"
)
Variables ¶
View Source
var ( DefaultCpu = 256 DefaultMem = 512 )
Functions ¶
This section is empty.
Types ¶
type DefaultsSetter ¶
type DefaultsSetter interface {
SetDefaults() error
}
type Environment ¶
type Environment []string
func (*Environment) UnmarshalYAML ¶
func (v *Environment) UnmarshalYAML(unmarshal func(interface{}) error) error
type Manifest ¶
type Manifest struct { Environment Environment `yaml:"environment,omitempty"` Params Params `yaml:"params,omitempty"` Resources Resources `yaml:"resources,omitempty"` Services Services `yaml:"services,omitempty"` Timers Timers `yaml:"timers,omitempty"` // contains filtered or unexported fields }
func (*Manifest) ApplyDefaults ¶
func (*Manifest) AttributeSet ¶
func (*Manifest) Attributes ¶
func (*Manifest) AttributesByPrefix ¶
func (*Manifest) CombineEnv ¶
func (*Manifest) ServiceEnvironment ¶
func (*Manifest) SetAttributes ¶
used only for tests
type NameGetter ¶
type NameGetter interface {
GetName() string
}
type NameSetter ¶
type Resource ¶
type Resources ¶
type Resources []Resource
func (Resources) MarshalYAML ¶
func (*Resources) UnmarshalYAML ¶
type Service ¶
type Service struct { Name string `yaml:"-"` Agent ServiceAgent `yaml:"agent,omitempty"` Build ServiceBuild `yaml:"build,omitempty"` Command ServiceCommand `yaml:"command,omitempty"` Deployment ServiceDeployment `yaml:"deployment,omitempty"` Domains ServiceDomains `yaml:"domain,omitempty"` Drain int `yaml:"drain,omitempty"` Environment Environment `yaml:"environment,omitempty"` Health ServiceHealth `yaml:"health,omitempty"` Image string `yaml:"image,omitempty"` Init bool `yaml:"init,omitempty"` Internal bool `yaml:"internal,omitempty"` Links []string `yaml:"links,omitempty"` Policies []string `yaml:"policies,omitempty"` Port ServicePort `yaml:"port,omitempty"` Privileged bool `yaml:"privileged,omitempty"` Resources []string `yaml:"resources,omitempty"` Scale ServiceScale `yaml:"scale,omitempty"` Singleton bool `yaml:"singleton,omitempty"` Sticky bool `yaml:"sticky,omitempty"` Termination ServiceTermination `yaml:"termination,omitempty"` Test string `yaml:"test,omitempty"` Volumes []string `yaml:"volumes,omitempty"` }
func (Service) EnvironmentDefaults ¶
func (Service) EnvironmentKeys ¶
type ServiceAgent ¶
type ServiceAgent struct { Enabled bool `yaml:"enabled,omitempty"` Ports []ServiceAgentPort `yaml:"ports,omitempty"` }
func (*ServiceAgent) UnmarshalYAML ¶
func (v *ServiceAgent) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceAgentPort ¶
type ServiceAgentPort struct { Port int `yaml:"port,omitempty"` Protocol string `yaml:"protocol,omitempty"` }
func (*ServiceAgentPort) UnmarshalYAML ¶
func (v *ServiceAgentPort) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceBuild ¶
type ServiceBuild struct { Args []string `yaml:"args,omitempty"` Manifest string `yaml:"manifest,omitempty"` Path string `yaml:"path,omitempty"` }
func (ServiceBuild) MarshalYAML ¶
func (v ServiceBuild) MarshalYAML() (interface{}, error)
func (*ServiceBuild) UnmarshalYAML ¶
func (v *ServiceBuild) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceCommand ¶
type ServiceCommand []string
func (*ServiceCommand) UnmarshalYAML ¶
func (v *ServiceCommand) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceDeployment ¶
type ServiceDomains ¶
type ServiceDomains []string
func (*ServiceDomains) UnmarshalYAML ¶
func (v *ServiceDomains) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceHealth ¶
func (*ServiceHealth) UnmarshalYAML ¶
func (v *ServiceHealth) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServicePort ¶
type ServicePort struct { Port int `yaml:"port,omitempty"` Scheme string `yaml:"scheme,omitempty"` }
func (ServicePort) MarshalYAML ¶
func (v ServicePort) MarshalYAML() (interface{}, error)
func (*ServicePort) UnmarshalYAML ¶
func (v *ServicePort) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceScale ¶
type ServiceScale struct { Cooldown ServiceScaleCooldown Count ServiceScaleCount Cpu int Memory int Targets ServiceScaleTargets `yaml:"targets,omitempty"` }
func (*ServiceScale) UnmarshalYAML ¶
func (v *ServiceScale) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceScaleCooldown ¶
func (*ServiceScaleCooldown) UnmarshalYAML ¶
func (v *ServiceScaleCooldown) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceScaleCount ¶
func (ServiceScaleCount) MarshalYAML ¶
func (v ServiceScaleCount) MarshalYAML() (interface{}, error)
func (*ServiceScaleCount) UnmarshalYAML ¶
func (v *ServiceScaleCount) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceScaleMetric ¶
type ServiceScaleMetrics ¶
type ServiceScaleMetrics []ServiceScaleMetric
func (*ServiceScaleMetrics) UnmarshalYAML ¶
func (v *ServiceScaleMetrics) UnmarshalYAML(unmarshal func(interface{}) error) error
type ServiceScaleTargets ¶
type ServiceScaleTargets struct { Cpu int Custom ServiceScaleMetrics Memory int Requests int }
type ServiceTermination ¶
type ServiceTermination struct {
Grace int `yaml:"grace,omitempty"`
}
type Services ¶
type Services []Service
func (Services) MarshalYAML ¶
func (*Services) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.