execforward

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package execforward is the main entrypoint that provides the high level functionality used by the exec-forward CLI. It defines the lifecycle of a forwarding connection, including "pre" and "post" connect hooks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, client *forwarder.Client, hooksConfig *Config, cliArgs map[string]string, resource string, portMap string, streams genericclioptions.IOStreams) error

Run executes hooks found on the passed resource's underlying pod annotations and opens a forwarding connection to the resource.

Types

type Config

type Config struct {
	LocalPort int
	Verbose   bool
	Command   []string
	Persist   bool
}

Config stores configuration which is used to construct the tunnel as well as passed to the hook commands.

type Hooks

type Hooks struct {
	Pre     command.Commands
	Post    command.Commands
	Command command.Command
}

Hooks store information regarding command hooks.

Jump to

Keyboard shortcuts

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