opts

package
v0.0.0-...-f2d3d7a Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: Apache-2.0 Imports: 7 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 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 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 ValidateAnnotation

func ValidateAnnotation(annotations map[string]string) error

ValidateAnnotation validate the correctness of spec annotation param of a container.

func ValidateCPUPeriod

func ValidateCPUPeriod(period int64) error

ValidateCPUPeriod validates CPU options for container.

func ValidateCPUQuota

func ValidateCPUQuota(quota int64) error

ValidateCPUQuota validates CPU options for container.

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 ValidateMemorySwap

func ValidateMemorySwap(memorySwap int64) error

ValidateMemorySwap verifies the correctness of memory-swap.

func ValidateMemorySwappiness

func ValidateMemorySwappiness(memorySwappiness int64) error

ValidateMemorySwappiness verifies the correctness of memory-swappiness.

func ValidateNetworks

func ValidateNetworks(nwConfig *types.NetworkingConfig) error

ValidateNetworks verifies network configurations of container.

func ValidateOOMScore

func ValidateOOMScore(score int64) error

ValidateOOMScore validates oom score

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.

Jump to

Keyboard shortcuts

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