tunnel

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 29 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegistryPath added in v1.5.0

func RegistryPath() string

RegistryPath returns the path to the runnel registry file

Types

type HostState

type HostState int

HostState represents the status of a host

const (
	// Unknown represents an unknown state
	Unknown HostState = iota
	// Running represents a running state
	Running
	// Stopped represents a stopped state
	Stopped
)

func (HostState) String

func (h HostState) String() string

type ID

type ID struct {
	// Route is the key
	Route *Route
	// the rest is metadata
	MachineName string
	Pid         int
}

ID represents a registry ID

func (*ID) Equal

func (t *ID) Equal(other *ID) bool

Equal checks if two ID are equal

func (*ID) String

func (t *ID) String() string

type LoadBalancerEmulator added in v1.8.0

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

LoadBalancerEmulator is the main struct for emulating the loadbalancer behavior. it sets the ingress to the cluster IP

func NewLoadBalancerEmulator added in v1.8.0

func NewLoadBalancerEmulator(corev1Client typed_core.CoreV1Interface) LoadBalancerEmulator

NewLoadBalancerEmulator creates a new LoadBalancerEmulator

func (*LoadBalancerEmulator) Cleanup added in v1.8.0

func (l *LoadBalancerEmulator) Cleanup() ([]string, error)

Cleanup will clean up all load balancer services

func (*LoadBalancerEmulator) PatchServiceIP added in v1.8.0

func (l *LoadBalancerEmulator) PatchServiceIP(restClient rest.Interface, svc core.Service, ip string) error

PatchServiceIP will patch the given service and ip

func (*LoadBalancerEmulator) PatchServices added in v1.8.0

func (l *LoadBalancerEmulator) PatchServices() ([]string, error)

PatchServices will update all load balancer services

type Manager

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

Manager can create, start and cleanup a tunnel It keeps track of created tunnels for multiple vms so that it can cleanup after unclean shutdowns.

func NewManager

func NewManager() *Manager

NewManager creates a new Manager

func (*Manager) CleanupNotRunningTunnels

func (mgr *Manager) CleanupNotRunningTunnels() error

CleanupNotRunningTunnels cleans up tunnels that are not running

func (*Manager) StartTunnel

func (mgr *Manager) StartTunnel(ctx context.Context, machineName string, machineAPI libmachine.API, configLoader config.Loader, v1Core typed_core.CoreV1Interface) (done chan bool, err error)

StartTunnel starts the tunnel

type Patch

type Patch struct {
	Type         types.PatchType
	NameSpace    string
	NameSpaceSet bool
	Resource     string
	Subresource  string
	ResourceName string
	BodyContent  string
}

Patch represents a patch

type Route

type Route struct {
	Gateway       net.IP
	DestCIDR      *net.IPNet
	ClusterDomain string
	ClusterDNSIP  net.IP
}

Route represents a route

func (*Route) Equal

func (r *Route) Equal(other *Route) bool

Equal checks if two routes are equal

func (*Route) String

func (r *Route) String() string

type Status

type Status struct {
	TunnelID ID

	MinikubeState HostState
	MinikubeError error

	RouteError error

	PatchedServices           []string
	LoadBalancerEmulatorError error
}

Status represents the tunnel status

func (*Status) Clone

func (t *Status) Clone() *Status

Clone clones an existing Status

func (*Status) String

func (t *Status) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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