Documentation ¶
Index ¶
- Variables
- type Container
- type ContainerCtrlPostRequest
- type ContainerFilter
- type ContainerNet
- type ContainerSetState
- type ContainerState
- type ContainersPostResponse
- type Duration
- type FileMode
- type IPAddr
- type Image
- type ImageFilter
- type ImagesPostRequest
- type LogOptions
- type Mount
- type MountType
- type Network
- type NetworkType
- type Port
- type PortBinding
- type PortType
- type RestartStrategy
- type RunConfig
- type Subnet
- type Volume
- type VolumeFilter
Constants ¶
This section is empty.
Variables ¶
View Source
var ContainerSetStateMap = map[string]ContainerSetState{ string(ContainerStart): ContainerStart, string(ContainerStop): ContainerStop, string(ContainerRestart): ContainerRestart, }
View Source
var ContainerStateMap = map[string]ContainerState{ string(InitState): InitState, string(RunningState): RunningState, string(RestartingState): RestartingState, string(StoppedState): StoppedState, string(UnhealthyState): UnhealthyState, string(UnknownState): UnknownState, }
View Source
var MountTypeMap = map[string]MountType{ string(BindMount): BindMount, string(VolumeMount): VolumeMount, string(TmpfsMount): TmpfsMount, }
View Source
var NetworkTypeMap = map[string]NetworkType{ string(BridgeNet): BridgeNet, string(MACVlanNet): MACVlanNet, string(HostNet): HostNet, }
View Source
var PortTypeMap = map[string]PortType{ string(TcpPort): TcpPort, string(UdpPort): UdpPort, string(SctpPort): SctpPort, }
View Source
var RestartStrategyMap = map[string]RestartStrategy{ string(RestartNever): RestartNever, string(RestartAlways): RestartAlways, string(RestartNotStopped): RestartNotStopped, string(RestartOnFail): RestartOnFail, }
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { ID string `json:"id"` Name string `json:"name"` State ContainerState `json:"state"` Created time.Time `json:"created"` Started *time.Time `json:"started"` Image string `json:"image"` ImageID string `json:"image_id"` EnvVars map[string]string `json:"env_vars"` Labels map[string]string `json:"labels"` Mounts []Mount `json:"mounts"` Ports []Port `json:"ports"` Networks []ContainerNet `json:"networks"` RunConfig RunConfig `json:"run_config"` }
type ContainerCtrlPostRequest ¶
type ContainerCtrlPostRequest struct {
State ContainerSetState `json:"state"`
}
type ContainerFilter ¶
type ContainerFilter struct { Name string State ContainerState Labels map[string]string }
type ContainerNet ¶
type ContainerSetState ¶
type ContainerSetState string
const ( ContainerStart ContainerSetState = "start" ContainerStop ContainerSetState = "stop" ContainerRestart ContainerSetState = "restart" )
func (*ContainerSetState) UnmarshalJSON ¶
func (c *ContainerSetState) UnmarshalJSON(b []byte) (err error)
type ContainerState ¶
type ContainerState string
const ( InitState ContainerState = "initialized" RunningState ContainerState = "running" RestartingState ContainerState = "restarting" StoppedState ContainerState = "stopped" UnhealthyState ContainerState = "unhealthy" UnknownState ContainerState = "unknown" )
type ContainersPostResponse ¶
type ContainersPostResponse struct {
ID string `json:"id"`
}
type Duration ¶
func (Duration) MarshalJSON ¶
func (Duration) MarshalYAML ¶ added in v0.4.0
func (*Duration) UnmarshalJSON ¶
func (*Duration) UnmarshalYAML ¶ added in v0.4.0
type FileMode ¶ added in v0.5.0
func (FileMode) MarshalJSON ¶ added in v0.5.0
func (FileMode) MarshalYAML ¶ added in v0.5.0
func (*FileMode) UnmarshalJSON ¶ added in v0.5.0
func (*FileMode) UnmarshalYAML ¶ added in v0.5.0
type IPAddr ¶
func (*IPAddr) UnmarshalJSON ¶
type ImageFilter ¶
type ImagesPostRequest ¶
type ImagesPostRequest struct {
Image string `json:"image"`
}
type Mount ¶
type Network ¶
type Network struct { ID string `json:"id"` Name string `json:"name"` Type NetworkType `json:"type"` Subnet Subnet `json:"subnet"` Gateway IPAddr `json:"gateway"` }
type NetworkType ¶
type NetworkType string
const ( BridgeNet NetworkType = "bridge" MACVlanNet NetworkType = "macvlan" HostNet NetworkType = "host" )
func (*NetworkType) UnmarshalJSON ¶
func (n *NetworkType) UnmarshalJSON(b []byte) (err error)
type Port ¶
type Port struct { Number int `json:"number"` Protocol PortType `json:"protocol"` Bindings []PortBinding `json:"bindings"` }
type PortBinding ¶
type RestartStrategy ¶
type RestartStrategy string
const ( RestartNever RestartStrategy = "never" RestartAlways RestartStrategy = "always" RestartNotStopped RestartStrategy = "not-stopped" RestartOnFail RestartStrategy = "on-fail" )
func (*RestartStrategy) UnmarshalJSON ¶
func (r *RestartStrategy) UnmarshalJSON(b []byte) (err error)
func (*RestartStrategy) UnmarshalYAML ¶ added in v0.4.0
func (r *RestartStrategy) UnmarshalYAML(yn *yaml.Node) (err error)
type RunConfig ¶
type RunConfig struct { RestartStrategy RestartStrategy `json:"restart_strategy" yaml:"restartStrategy"` Retries *int `json:"retries" yaml:"retries"` RemoveAfterRun bool `json:"remove_after_run" yaml:"removeAfterRun"` StopTimeout *Duration `json:"stop_timeout" yaml:"stopTimeout"` StopSignal *string `json:"stop_signal" yaml:"stopSignal"` PseudoTTY bool `json:"pseudo_tty" yaml:"pseudoTTY"` }
type VolumeFilter ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.