kubernetes

package
v0.0.0-...-cc457c8 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Forwarding = regexp.MustCompile(`^\d+(?::\d+)?$`)

Forwarding defines the format for port forwarding input.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// Find tries to find pods suitable by the pattern.
	Find(string) (Pods, error)
	// Forward initiates the port forwarding process.
	Forward(Pod, Mapping) error
}

Interface defines a top-level behavior of Kubernetes provider (API or CLI).

type Local

type Local Port

Local specifies local ports.

type Mapping

type Mapping map[Local]Remote

Mapping specifies port forwarding rules.

func NewMapping

func NewMapping(args ...string) (Mapping, error)

NewMapping returns port forwarding rules.

type Pod

type Pod string

Pod specifies a fully-qualified pod name.

func (Pod) Like

func (pod Pod) Like(pattern string) bool

Like compares the fully-qualified pod name with the pattern.

func (Pod) String

func (pod Pod) String() string

String returns string representation of the fully-qualified pod name.

type Pods

type Pods []Pod

Pods is a list of fully-qualified pod names.

func (Pods) AsStrings

func (pods Pods) AsStrings() []string

AsStrings converts a list of fully-qualified pod names into a string list.

func (Pods) Default

func (pods Pods) Default() Pod

Default returns a default fully-qualified pod name from the list.

type Port

type Port int16

Port is a type for port number.

func (Port) String

func (port Port) String() string

String returns string representation of the port number.

type Remote

type Remote Port

Remote specifies remote ports.

Directories

Path Synopsis
api
cli

Jump to

Keyboard shortcuts

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