Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder() *Builder
func (*Builder) AddNetwork ¶ added in v1.0.3
func (*Builder) AddService ¶
func (b *Builder) AddService(s ServiceBuilder) *Builder
type Compose ¶
type HealthCheck ¶
type HealthCheck struct { Test []string `yaml:"test,omitempty"` // Interval between two health checks, the default is 30 seconds. Interval time.Duration `yaml:"interval,omitempty"` // The health check command runs the timeout period. // If this time is exceeded, the health check is regarded as a failure. Timeout time.Duration `yaml:"timeout,omitempty"` // When the specified number of consecutive failures, the container status is treated as unhealthy, the default is 3 times. Retries uint `yaml:"retries,omitempty"` // The number of seconds to start the health check after the container starts, the default is 0 seconds. StartPeriod time.Duration `yaml:"start_period,omitempty"` }
type IPAM ¶ added in v1.0.3
type IPAM struct {
Config []IPAMConfig `yaml:"config"`
}
type IPAMConfig ¶ added in v1.0.3
type IPAMConfig struct { Subnet string `yaml:"subnet"` Gateway string `yaml:"gateway"` IPRange string `yaml:"ip_range"` }
func (*IPAMConfig) Validate ¶ added in v1.0.3
func (c *IPAMConfig) Validate() error
type Network ¶ added in v1.0.3
type Service ¶
type Service struct { Name string `yaml:"-"` Image string `yaml:"image,omitempty"` Command string `yaml:"command,omitempty"` Environment map[string]string `yaml:"environment,omitempty"` Ports []string `yaml:"ports,omitempty"` Volumes []string `yaml:"volumes,omitempty"` HealthCheck *HealthCheck `yaml:"healthcheck,omitempty"` Network map[string]ServiceNetwork `yaml:"networks,omitempty"` Privileged bool `yaml:"privileged,omitempty"` }
type ServiceBuilder ¶
type ServiceBuilder interface {
Service() *Service
}
type ServiceNetwork ¶ added in v1.0.3
type ServiceNetwork struct {
IPv4 string `yaml:"ipv4_address,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.