port_forward

package module
v0.0.0-...-f67d63c Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: MIT Imports: 12 Imported by: 0

README

k8s-port-forward

Straightforward and naive implementation of port forwarding of an existing K8S Pod built on top of K8S API.

The package was initially developed for internal use only to provide K8S port forwarding capabilities for a 3rd-party app (not Golang based). The idea was not to get locked on an existence of kubectl tool as well as providing of porcelain output.

cmd/sample_app.go provides with a sample usage (almost 100% close to a real life) of the package.

License

The library is released under the MIT license. See LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodSpec

type PodSpec struct {
	Name      string
	Namespace string
}

type PortForwarding

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

func New

func (PortForwarding) Start

func (self PortForwarding) Start() error

func (PortForwarding) Stop

func (self PortForwarding) Stop()

func (PortForwarding) WaitForReady

func (self PortForwarding) WaitForReady()

type PortForwardingSpec

type PortForwardingSpec struct {
	KubeConfigPath string
	Pod            PodSpec
	Ports          PortsSpec
}

type PortsSpec

type PortsSpec struct {
	Local  int
	Remote int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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