component

package
v0.0.0-...-5e39469 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlkioConfig

type BlkioConfig struct {
	Weight          uint16
	WeightDevice    []*blkiodev.WeightDevice   `yaml:"weight_device"`
	DeviceReadBps   []*blkiodev.ThrottleDevice `yaml:"device_read_bps"`
	DeviceWriteBps  []*blkiodev.ThrottleDevice `yaml:"device_read_iops"`
	DeviceReadIOps  []*blkiodev.ThrottleDevice `yaml:"device_write_bps"`
	DeviceWriteIOps []*blkiodev.ThrottleDevice `yaml:"device_write_iops"`
}

type Component

type Component struct {
	Image           string
	Entrypoint      interface{}
	Command         interface{}
	WorkingDir      string      `yaml:"working_dir"`
	EnvFile         interface{} `yaml:"env_file"`
	Environment     interface{}
	Labels          interface{}
	Privileged      bool
	ReadOnly        bool `yaml:"read_only"`
	StdinOpen       bool `yaml:"stdin_open"`
	Tty             bool
	StopSignal      string        `yaml:"stop_signal"`
	StopGracePeriod time.Duration `yaml:"stop_grace_period"`
	User            string
	Runtime         string
	Tmpfs           interface{}

	Volumes []interface{}

	Healthcheck *Healthcheck

	OomScoreAdj    *int  `yaml:"oom_score_adj"`
	OomKillDisable *bool `yaml:"oom_kill_disable"`

	CapAdd      []string          `yaml:"cap_add"`
	CapDrop     []string          `yaml:"cap_drop"`
	GroupAdd    []string          `yaml:"group_add"`
	SecurityOpt []string          `yaml:"security_opt"`
	StorageOpt  map[string]string `yaml:"storage_opt"`
	Sysctls     interface{}
	UsernsMode  string `yaml:"userns_mode"`

	Devices           []string
	DeviceCgroupRules []string `yaml:"device_cgroup_rules"`

	Isolation string

	MemoryLimit       string  `yaml:"mem_limit"`
	MemoryReservation *int64  `yaml:"mem_reservation"`
	MemorySwapLimit   string  `yaml:"memswap_limit"`
	MemorySwappiness  *int64  `yaml:"mem_swappiness"`
	ShmSize           *string `yaml:"shm_size"`

	CPUShares          int64   `yaml:"cpu_shares"`
	CPUs               float64 `yaml:"cpus"`
	CPUPeriod          int64   `yaml:"cpu_period"`
	CPUQuota           int64   `yaml:"cpu_quota"`
	CPURealtimePeriod  int64   `yaml:"cpu_rt_period"`
	CPURealtimeRuntime int64   `yaml:"cpu_rt_runtime"`
	CpusetCpus         string  `yaml:"cpuset"`
	CPUCount           int64   `yaml:"cpu_count"`
	CPUPercent         int64   `yaml:"cpu_percent"`

	BlkioConfig *BlkioConfig `yaml:"blkio_config"`

	PidsLimit *int64 `yaml:"pids_limit"`

	Ulimits map[string]interface{}

	Logging *LoggingConfig

	DependsOn interface{} `yaml:"depends_on"`

	// the name and container ID set in runtime
	Name string `yaml:"-"`
	// contains filtered or unexported fields
}

func (*Component) DisableHealthChecking

func (c *Component) DisableHealthChecking()

func (*Component) GetDependencies

func (c *Component) GetDependencies() ([]Dependency, error)

func (*Component) Initialize

func (c *Component) Initialize(name string, client api.Controller, engine api.Engine)

func (*Component) Start

func (c *Component) Start(configuration *config.Configuration) error

func (*Component) Stop

func (c *Component) Stop() error

func (*Component) WaitFor

func (c *Component) WaitFor(exitChan chan<- ExitEvent)

type ComposeProject

type ComposeProject struct {
	Services map[string]Component
}

type CopyConfig

type CopyConfig struct {
	Source string
	Target string
}

type Dependency

type Dependency struct {
	Name string

	NeedsHealthyState bool
}

type ExitEvent

type ExitEvent struct {
	Component *Component

	StatusCode int64
	Error      error
}

type Healthcheck

type Healthcheck struct {
	Test        interface{}
	Interval    time.Duration
	Timeout     time.Duration
	StartPeriod time.Duration `yaml:"start_period"`
	Retries     int
	Disable     bool
}

type LoggingConfig

type LoggingConfig struct {
	Driver  string
	Options map[string]string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL