portforwarder

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package portforwarder provides port forwarding between local and Kubernetes.

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Start(ctx context.Context, eg *errgroup.Group, o Options) error
}

type Options

type Options struct {
	Config *rest.Config
	Source Source
	Target Target
}

Options represents an option of PortForwarder.

type PortForwarder

type PortForwarder struct {
	Logger logger.Interface
}

PortForwarder provides port forwarding from a local port to a pod container port.

func (*PortForwarder) Start

func (pf *PortForwarder) Start(ctx context.Context, eg *errgroup.Group, o Options) error

Start starts port forwarding in goroutines.

type Source

type Source struct {
	Port int
}

Source represents a local source.

type Target

type Target struct {
	Pod           *v1.Pod
	ContainerPort int
}

Target represents a target pod.

Directories

Path Synopsis
Package mock_portforwarder is a generated GoMock package.
Package mock_portforwarder is a generated GoMock package.

Jump to

Keyboard shortcuts

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