tunnel

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostState

type HostState int

State represents the status of a host

const (
	Unknown HostState = iota
	Running
	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
}

There is one tunnel registry per user, shared across multiple vms. It can register, list and check for existing and running tunnels

func (*ID) Equal

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

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

func (*Manager) CleanupNotRunningTunnels

func (mgr *Manager) CleanupNotRunningTunnels() error

func (*Manager) StartTunnel

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

type Patch

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

type Route

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

func (*Route) Equal

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

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
}

func (*Status) Clone

func (t *Status) Clone() *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