parse

package
v1.7.0-tar Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

nolint most of these validate and parse functions have been taken from projectatomic/docker and modified for cri-o

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadKVStrings

func ReadKVStrings(env map[string]string, files []string, override []string) error

reads a file of line terminated key=value pairs, and overrides any keys present in the file with additional pairs specified in the override parameter for env-file and labels-file flags

func ValidURL

func ValidURL(urlStr string) error

ValidURL checks a string urlStr is a url or not

func ValidateDomain

func ValidateDomain(val string) (string, error)

func ValidateExtraHost

func ValidateExtraHost(val string) (string, error)

validateExtraHost validates that the specified string is a valid extrahost and returns it. ExtraHost is in the form of name:ip where the ip has to be a valid ip (ipv4 or ipv6). for add-host flag

func ValidateFileName

func ValidateFileName(filename string) error

ValidateFileName returns an error if filename contains ":" as it is currently not supported

Types

type PortMapping

type PortMapping struct {
	// Protocol of the port mapping.
	Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=runtime.Protocol" json:"protocol,omitempty"`
	// Port number within the container. Default: 0 (not specified).
	ContainerPort int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"`
	// Port number on the host. Default: 0 (not specified).
	HostPort int32 `protobuf:"varint,3,opt,name=host_port,json=hostPort,proto3" json:"host_port,omitempty"`
	// Host IP.
	HostIp string `protobuf:"bytes,4,opt,name=host_ip,json=hostIp,proto3" json:"host_ip,omitempty"`
}

PortMapping specifies the port mapping configurations of a sandbox.

type Protocol

type Protocol int32
const (
	Protocol_TCP Protocol = 0
	Protocol_UDP Protocol = 1
)

Jump to

Keyboard shortcuts

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