Documentation ¶
Index ¶
- func CheckBind(b string) ([]string, error)
- func CheckDuplicateMountPoint(mounts []*types.MountPoint, destination string) bool
- func ParseAnnotation(annotations []string) (map[string]string, error)
- func ParseBindMode(mp *types.MountPoint, mode string) error
- func ParseDeviceMappings(devices []string) ([]*types.DeviceMapping, error)
- func ParseDiskQuota(quotas []string) (map[string]string, error)
- func ParseEnvs(envs []string) ([]string, error)
- func ParseExposedPorts(portList, expose []string) (map[string]interface{}, error)
- func ParseIntelRdt(intelRdtL3Cbm string) (string, error)
- func ParseLabels(labels []string) map[string]string
- func ParseLogOptions(driver string, logOpts []string) (map[string]string, error)
- func ParseMemory(memory string) (int64, error)
- func ParseMemoryReservation(memoryReservation string) (int64, error)
- func ParseMemorySwap(memorySwap string) (int64, error)
- func ParseNetworks(networks []string) (*types.NetworkingConfig, string, error)
- func ParsePortBinding(ports []string) (types.PortMap, error)
- func ParseQuotaID(id string, quotas []string) (string, error)
- func ParseRestartPolicy(restartPolicy string) (*types.RestartPolicy, error)
- func ParseShmSize(size string) (int64, error)
- func ParseSysctls(sysctls []string) (map[string]string, error)
- func ParseVolumesFrom(volume string) (string, string, error)
- func SetEndpointIPAddress(nwConfig *types.NetworkingConfig, mode, ipv4, ipv6 string) error
- func ValidMapEnvsToSlice(envs map[string]string) []string
- func ValidSliceEnvsToMap(envs []string) map[string]string
- func ValidateDeviceMode(mode string) bool
- func ValidateDiskQuota(quotaMaps map[string]string) error
- func ValidateEnv(map[string]string) error
- func ValidateExposedPorts(ports map[string]interface{}) error
- func ValidateExtraHost(val string) error
- func ValidateNetworks(nwConfig *types.NetworkingConfig) error
- func ValidatePortBinding(portBindings types.PortMap) error
- func ValidateRestartPolicy(policy *types.RestartPolicy) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDuplicateMountPoint ¶
func CheckDuplicateMountPoint(mounts []*types.MountPoint, destination string) bool
CheckDuplicateMountPoint is used to check duplicate mount point
func ParseAnnotation ¶
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 ¶
ParseDiskQuota parses diskquota configurations of container.
func ParseExposedPorts ¶
ParseExposedPorts parse ports. FIXME(ziren): add more explanation
func ParseIntelRdt ¶
ParseIntelRdt parses inter-rdt params of container
func ParseLabels ¶
ParseLabels parses the labels params of container.
func ParseLogOptions ¶
ParseLogOptions parses [key=value] slice-type log options into map.
func ParseMemory ¶
ParseMemory parses the memory param of container.
func ParseMemoryReservation ¶
ParseMemoryReservation parses the memory-reservation param of container.
func ParseMemorySwap ¶
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 ¶
ParsePortBinding parse string list to PortMap FIXME(ziren): add examples
func ParseQuotaID ¶
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 ¶
ParseShmSize parses size of /dev/shm
func ParseSysctls ¶
ParseSysctls parses the sysctl params of container
func ParseVolumesFrom ¶
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 ¶
ValidMapEnvsToSlice converts valid map envs to slice.
func ValidSliceEnvsToMap ¶
ValidSliceEnvsToMap converts slice envs to be map assuming that the input are always valid with a char of '='.
func ValidateDeviceMode ¶
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 ¶
ValidateDiskQuota verifies diskquota configurations of container.
func ValidateEnv ¶
ValidateEnv verifies the correct of env
func ValidateExposedPorts ¶
ValidateExposedPorts verify the correction of exposed ports.
func ValidateExtraHost ¶
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 ¶
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.