opts

package
v0.0.0-...-8680cc4 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 11 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 ParseEnvs

func ParseEnvs(envs []string) ([]string, error)

ParseEnvs parses the env slice in container's config.

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

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 ParseMemoryReservation

func ParseMemoryReservation(memoryReservation string) (int64, error)

ParseMemoryReservation parses the memory-reservation 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 ParseQuotaID

func ParseQuotaID(id string, quotas []string) (string, error)

ParseQuotaID parses quota id configurations of container.

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 SetEndpointIPAddress

func SetEndpointIPAddress(nwConfig *types.NetworkingConfig, mode, ipv4, ipv6 string) error

SetEndpointIPAddress set the ip address of the endpoint when network is bridge.

func ValidMapEnvsToSlice

func ValidMapEnvsToSlice(envs map[string]string) []string

ValidMapEnvsToSlice converts valid map envs to slice.

func ValidSliceEnvsToMap

func ValidSliceEnvsToMap(envs []string) map[string]string

ValidSliceEnvsToMap converts slice envs to be map assuming that the input are always valid with a char of '='.

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 ValidateExtraHost

func ValidateExtraHost(val string) error

ValidateExtraHost validates the provided string is a valid extra-host.

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