tunnel

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2019 License: Apache-2.0 Imports: 29 Imported by: 4

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 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

Jump to

Keyboard shortcuts

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