Documentation ¶
Index ¶
- type Builder
- type Command
- func (c *Command) Close() error
- func (c *Command) Down(args ...string) error
- func (c *Command) File() string
- func (c *Command) Logs(args ...string) error
- func (c *Command) Project() string
- func (c *Command) Ps(args ...string) error
- func (c *Command) Runtime() string
- func (c *Command) ServiceExitCode(service string) (int, error)
- func (c *Command) Stop(args ...string) error
- func (c *Command) Up(args ...string) error
- func (c *Command) Wait(interval, timeout time.Duration, services []string) error
- type Compose
- type HealthCheck
- type IPAM
- type IPAMConfig
- type Network
- type Service
- type ServiceBuilder
- type ServiceNetwork
- type Volume
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(sb ServiceBuilder) *Builder
type Command ¶ added in v1.3.0
type Command struct {
// contains filtered or unexported fields
}
func NewCommand ¶ added in v1.3.0
func (*Command) ServiceExitCode ¶ added in v1.4.0
type Compose ¶
type Compose struct { Services map[string]*Service `yaml:"services,omitempty"` Networks map[string]*Network `yaml:"networks,omitempty"` Volumes map[string]*Volume `yaml:"volumes,omitempty"` }
func (*Compose) AddNetwork ¶ added in v1.3.0
func (*Compose) AddService ¶ added in v1.3.0
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
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"` CPUs int `yaml:"cpus,omitempty"` CPUSet string `yaml:"cpuset,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.