Documentation ¶
Index ¶
- Variables
- func CheckNetworks(n []model.ContainerNet) error
- func GenContainerFilterArgs(filter model.ContainerFilter) filters.Args
- func GenDevices(devices []model.Device) ([]container.DeviceMapping, error)
- func GenEnv(ev map[string]string) (env []string)
- func GenImageFilterArgs(filter model.ImageFilter) filters.Args
- func GenMounts(mounts []model.Mount) ([]mount.Mount, error)
- func GenNetIPAMConfig(n model.Network) (c []network.IPAMConfig)
- func GenPortMap(ports []model.Port) (nat.PortMap, error)
- func GenRestartPolicy(strategy model.RestartStrategy, retries *int) (rp container.RestartPolicy, err error)
- func GenStopTimeout(d *time.Duration) *int
- func GenVolumeFilterArgs(filter model.VolumeFilter) filters.Args
- func GetConst(s string, m map[string]string) string
- func ParseContainerName(s string) string
- func ParseEndpointSettings(endptSettings map[string]*network.EndpointSettings) (netInfo []model.ContainerNet)
- func ParseEnv(ev []string) (env map[string]string)
- func ParseMountPoints(mountPoints []types.MountPoint) (mounts []model.Mount)
- func ParseMounts(mts []mount.Mount) (mounts []model.Mount)
- func ParseNetIPAMConfig(c []network.IPAMConfig) (s model.Subnet, gw model.IPAddr)
- func ParsePortSetAndMap(portSet nat.PortSet, portMap nat.PortMap) ([]model.Port, error)
- func ParseRestartPolicy(rp container.RestartPolicy) (strategy model.RestartStrategy, retires *int)
- func ParseStopTimeout(t *int) *time.Duration
- func ParseTimestamp(s string) (time.Time, error)
- type ImgPullResp
- type RCWrapper
Constants ¶
This section is empty.
Variables ¶
View Source
var HealthMap = map[string]model.ContainerHealth{ "starting": model.TransitionState, "healthy": model.HealthyState, "unhealthy": model.UnhealthyState, }
View Source
var MountTypeMap = map[mount.Type]model.MountType{ mount.TypeBind: model.BindMount, mount.TypeVolume: model.VolumeMount, mount.TypeTmpfs: model.TmpfsMount, }
View Source
var MountTypeRMap = func() map[model.MountType]mount.Type { m := make(map[model.MountType]mount.Type) for k, v := range MountTypeMap { m[v] = k } return m }()
View Source
var NetTypeMap = map[string]model.NetworkType{ "bridge": model.BridgeNet, "macvlan": model.MACVlanNet, "host": model.HostNet, }
View Source
var NetTypeRMap = func() map[model.NetworkType]string { m := make(map[model.NetworkType]string) for k, v := range NetTypeMap { m[v] = k } return m }()
View Source
var PortTypeMap = map[string]model.PortType{ "tcp": model.TcpPort, "udp": model.UdpPort, "sctp": model.SctpPort, }
View Source
var PortTypeRMap = func() map[model.PortType]string { m := make(map[model.PortType]string) for k, v := range PortTypeMap { m[v] = k } return m }()
View Source
var RestartPolicyMap = map[string]model.RestartStrategy{ "no": model.RestartNever, "on-failure": model.RestartOnFail, "always": model.RestartAlways, "unless-stopped": model.RestartNotStopped, }
View Source
var RestartPolicyRMap = func() map[model.RestartStrategy]string { m := make(map[model.RestartStrategy]string) for k, v := range RestartPolicyMap { m[v] = k } return m }()
View Source
var StateMap = map[string]model.ContainerState{ "created": model.InitState, "running": model.RunningState, "paused": model.PausedState, "restarting": model.RestartingState, "removing": model.RemovingState, "exited": model.StoppedState, "dead": model.DeadState, }
View Source
var StateRMap = func() map[model.ContainerState]string { m := make(map[model.ContainerState]string) for k, v := range StateMap { m[v] = k } return m }()
Functions ¶
func CheckNetworks ¶
func CheckNetworks(n []model.ContainerNet) error
func GenContainerFilterArgs ¶
func GenContainerFilterArgs(filter model.ContainerFilter) filters.Args
func GenDevices ¶
func GenDevices(devices []model.Device) ([]container.DeviceMapping, error)
func GenImageFilterArgs ¶
func GenImageFilterArgs(filter model.ImageFilter) filters.Args
func GenNetIPAMConfig ¶
func GenNetIPAMConfig(n model.Network) (c []network.IPAMConfig)
func GenRestartPolicy ¶
func GenRestartPolicy(strategy model.RestartStrategy, retries *int) (rp container.RestartPolicy, err error)
func GenStopTimeout ¶
func GenVolumeFilterArgs ¶
func GenVolumeFilterArgs(filter model.VolumeFilter) filters.Args
func ParseContainerName ¶
func ParseEndpointSettings ¶
func ParseEndpointSettings(endptSettings map[string]*network.EndpointSettings) (netInfo []model.ContainerNet)
func ParseMountPoints ¶
func ParseMountPoints(mountPoints []types.MountPoint) (mounts []model.Mount)
func ParseNetIPAMConfig ¶
func ParsePortSetAndMap ¶
func ParseRestartPolicy ¶
func ParseRestartPolicy(rp container.RestartPolicy) (strategy model.RestartStrategy, retires *int)
func ParseStopTimeout ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.