portforward

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultPortForwarder

type DefaultPortForwarder struct {
	genericclioptions.IOStreams
}

func (*DefaultPortForwarder) ForwardPorts

func (f *DefaultPortForwarder) ForwardPorts(method string, url *url.URL, opts PortForwardOptions) error

type PortForwardOptions

type PortForwardOptions struct {
	PortForwarder    PortForwarder
	K8sClient        k8s.K8sClient
	ResourceResolver ResourceResolver

	Namespace string
	PodName   string

	Address      []string
	Ports        []string
	StopChannel  chan struct{}
	ReadyChannel chan struct{}
}

func NewPortForwardOptions

func NewPortForwardOptions(portForwardHelpers k8s.K8sClient, workspaceResolver ResourceResolver, portforwarder PortForwarder) *PortForwardOptions

func (*PortForwardOptions) Complete

func (o *PortForwardOptions) Complete(cmd *cobra.Command, t *terminal.Terminal, args []string, Port string) error

func (PortForwardOptions) RunPortforward

func (o PortForwardOptions) RunPortforward() error

type PortForwarder

type PortForwarder interface {
	ForwardPorts(method string, url *url.URL, opts PortForwardOptions) error
}

type ResourceResolver

type ResourceResolver interface {
	GetWorkspaceByID(id string) (*brev_api.AllWorkspaceData, error)
	GetWorkspaceByName(name string) (*brev_api.AllWorkspaceData, error)
}

Jump to

Keyboard shortcuts

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