ports

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PortSSH contains SSH port for the master node
	PortSSH = 2201
	// PortSSHWorker contains SSH port for the worker node
	PortSSHWorker = 2202
	// PortRegistry contains private image registry port
	PortRegistry = 5000
	// PortOCP contains OCP API server port
	PortOCP = 8443
	// PortAPI contains API server port
	PortAPI = 6443
	// PortVNC contains first VM VNC port
	PortVNC = 5901
	//PortOCPConsole contains OCP console port
	PortOCPConsole = 443

	// PortNameSSH contains master node SSH port name
	PortNameSSH = "ssh"
	// PortNameSSHWorker contains worker node SSH port name
	PortNameSSHWorker = "ssh-worker"
	// PortNameOCP contains OCP port name
	PortNameOCP = "ocp"
	// PortNameRegistry contains registry port name
	PortNameRegistry = "registry"
	// PortNameAPI contains API port name
	// TODO: change the name to API
	PortNameAPI = "k8s"
	// PortNameVNC contains VNC port name
	PortNameVNC = "vnc"
	// PortNameOCPConsole contains OCP console port
	PortNameOCPConsole = "console"
)

Variables

This section is empty.

Functions

func GetPublicPort

func GetPublicPort(port int, containerPorts []iopodman.ContainerPortMappings) (int, error)

func IsKnownPortName

func IsKnownPortName(name string) bool

func NameToNumber

func NameToNumber(name string) (int, error)

func PrintPublicPort

func PrintPublicPort(port int, containerPorts []iopodman.ContainerPortMappings) error

func ToStrings

func ToStrings(ports ...int) []string

Types

type PortInfo

type PortInfo struct {
	ExposedPort int
	Name        string
}

type PortMapping

type PortMapping struct {
	// contains filtered or unexported fields
}

func NewMappingFromFlags

func NewMappingFromFlags(flagSet *pflag.FlagSet, portInfos []PortInfo) (PortMapping, error)

func (PortMapping) ToStrings

func (pm PortMapping) ToStrings() []string

Jump to

Keyboard shortcuts

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