opts

package
v0.0.0-...-7ef7dd6 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBind

func CheckBind(b string) ([]string, error)

CheckBind is used to check the volume bind information.

func CheckDuplicateMountPoint

func CheckDuplicateMountPoint(mounts []*types.MountPoint, destination string) bool

CheckDuplicateMountPoint is used to check duplicate mount point

func ParseAnnotation

func ParseAnnotation(annotations []string) (map[string]string, error)

ParseAnnotation parses runtime annotations format.

func ParseBindMode

func ParseBindMode(mp *types.MountPoint, mode string) error

ParseBindMode is used to parse the bind's mode.

func ParseDeviceMappings

func ParseDeviceMappings(devices []string) ([]*types.DeviceMapping, error)

ParseDeviceMappings parse devicemappings

func ParseDiskQuota

func ParseDiskQuota(quotas []string) (map[string]string, error)

ParseDiskQuota parses diskquota configurations of container.

func ParseEnv

func ParseEnv(env []string) (map[string]string, error)

ParseEnv parses the env param of container.

func ParseExposedPorts

func ParseExposedPorts(portList, expose []string) (map[string]interface{}, error)

ParseExposedPorts parse ports. FIXME(ziren): add more explanation

func ParseIntelRdt

func ParseIntelRdt(intelRdtL3Cbm string) (string, error)

ParseIntelRdt parses inter-rdt params of container

func ParseLabels

func ParseLabels(labels []string) (map[string]string, error)

ParseLabels parses the labels params of container.

func ParseLogOptions

func ParseLogOptions(driver string, logOpts []string) (map[string]string, error)

ParseLogOptions parses [key=value] slice-type log options into map.

func ParseMemory

func ParseMemory(memory string) (int64, error)

ParseMemory parses the memory param of container.

func ParseMemorySwap

func ParseMemorySwap(memorySwap string) (int64, error)

ParseMemorySwap parses the memory-swap param of container.

func ParseNetworks

func ParseNetworks(networks []string) (*types.NetworkingConfig, string, error)

ParseNetworks parses network configurations of container.

func ParsePortBinding

func ParsePortBinding(ports []string) (types.PortMap, error)

ParsePortBinding parse string list to PortMap FIXME(ziren): add examples

func ParseRestartPolicy

func ParseRestartPolicy(restartPolicy string) (*types.RestartPolicy, error)

ParseRestartPolicy parses restart policy param of container.

func ParseShmSize

func ParseShmSize(size string) (int64, error)

ParseShmSize parses size of /dev/shm

func ParseSysctls

func ParseSysctls(sysctls []string) (map[string]string, error)

ParseSysctls parses the sysctl params of container

func ParseVolumesFrom

func ParseVolumesFrom(volume string) (string, string, error)

ParseVolumesFrom is used to parse the parameter of VolumesFrom.

func ValidateDeviceMode

func ValidateDeviceMode(mode string) bool

ValidateDeviceMode checks if the mode for device is valid or not. valid mode is a composition of r (read), w (write), and m (mknod).

func ValidateDiskQuota

func ValidateDiskQuota(quotaMaps map[string]string) error

ValidateDiskQuota verifies diskquota configurations of container.

func ValidateEnv

func ValidateEnv(map[string]string) error

ValidateEnv verifies the correct of env

func ValidateExposedPorts

func ValidateExposedPorts(ports map[string]interface{}) error

ValidateExposedPorts verify the correction of exposed ports.

func ValidateLabels

func ValidateLabels(map[string]string) error

ValidateLabels verifies the correct of labels

func ValidateNetworks

func ValidateNetworks(nwConfig *types.NetworkingConfig) error

ValidateNetworks verifies network configurations of container.

func ValidatePortBinding

func ValidatePortBinding(portBindings types.PortMap) error

ValidatePortBinding verify PortMap struct correctness.

func ValidateRestartPolicy

func ValidateRestartPolicy(policy *types.RestartPolicy) error

ValidateRestartPolicy verifies the correctness of restart policy of container.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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