k8sportforward

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

README

CircleCI

k8sportforward

Package k8sportforward exposes functionality similar to kubectl port-forward.

License

k8sportforward is under the Apache 2.0 license. See the LICENSE file for details.

Projects using k8sportforward

Test libraries
Libraries
Services & operators

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Forwarder

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

func NewForwarder

func NewForwarder(config ForwarderConfig) (*Forwarder, error)

func (*Forwarder) ForwardPort

func (f *Forwarder) ForwardPort(namespace string, podName string, remotePort int) (*Tunnel, error)

ForwardPort opens a tunnel to a kubernetes pod.

type ForwarderConfig

type ForwarderConfig struct {
	RestConfig *rest.Config
}

type Tunnel

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

func (*Tunnel) Close

func (t *Tunnel) Close() error

Close disconnects a tunnel connection. It always returns nil error to fulfil io.Closer interface.

func (*Tunnel) LocalAddress

func (t *Tunnel) LocalAddress() string

Jump to

Keyboard shortcuts

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