pkg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConfig     = errors.New("Error invalid config")
	ErrInvalidTunnelType = errors.New("Error invalid tunnel type")
)

Functions

func CommandExecute

func CommandExecute()

Types

type Config

type Config struct {
	Tunnels []Tunnel `yaml:"tunnels"`
}

func GetConfig

func GetConfig() *Config

func (*Config) UnmarshalYAML

func (t *Config) UnmarshalYAML(val *yaml.Node) error

type K8sPortForwardTunnel

type K8sPortForwardTunnel struct {
	TunnelType        `yaml:",inline"`
	Context           string `yaml:"context"`
	ResourceKind      string `yaml:"resource_kind"`
	ResourceNamespace string `yaml:"resource_namespace"`
	ResourceName      string `yaml:"resource_name"`
	RemotePort        int    `yaml:"remote_port"`
	LocalPort         int    `yaml:"local_port"`
}

func (K8sPortForwardTunnel) Down

func (t K8sPortForwardTunnel) Down() error

func (K8sPortForwardTunnel) GetLocalPort

func (t K8sPortForwardTunnel) GetLocalPort() int

func (K8sPortForwardTunnel) IsUp

func (t K8sPortForwardTunnel) IsUp() bool

func (K8sPortForwardTunnel) Name

func (t K8sPortForwardTunnel) Name() string

func (K8sPortForwardTunnel) PortMapping

func (t K8sPortForwardTunnel) PortMapping() string

func (K8sPortForwardTunnel) Status

func (t K8sPortForwardTunnel) Status() string

func (*K8sPortForwardTunnel) UnmarshalYAML

func (t *K8sPortForwardTunnel) UnmarshalYAML(val *yaml.Node) error

func (K8sPortForwardTunnel) Up

func (t K8sPortForwardTunnel) Up() error

type SSHTunnel

type SSHTunnel struct {
	TunnelType `yaml:",inline"`
	User       string `yaml:"user"`
	NodeName   string `yaml:"node_name"`
	RemotePort int    `yaml:"remote_port"`
	LocalPort  int    `yaml:"local_port"`
}

func (SSHTunnel) Down

func (t SSHTunnel) Down() error

func (SSHTunnel) GetLocalPort

func (t SSHTunnel) GetLocalPort() int

func (SSHTunnel) IsUp

func (t SSHTunnel) IsUp() bool

func (SSHTunnel) Name

func (t SSHTunnel) Name() string

func (SSHTunnel) PortMapping

func (t SSHTunnel) PortMapping() string

func (SSHTunnel) Status

func (t SSHTunnel) Status() string

func (*SSHTunnel) UnmarshalYAML

func (t *SSHTunnel) UnmarshalYAML(val *yaml.Node) error

func (SSHTunnel) Up

func (t SSHTunnel) Up() error

type Tunnel

type Tunnel interface {
	Name() string
	Status() string
	PortMapping() string
	Up() error
	Down() error
	IsUp() bool
	GetLocalPort() int
}

type TunnelType

type TunnelType struct {
	Type string `yaml:"type"`
}

Jump to

Keyboard shortcuts

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