tele

package
v0.0.0-...-fd2add7 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package tele implements the circuit/use/n networking module using Teleport Transport

Index

Constants

View Source
const IdleDuration = time.Second * 10

Idleness duration should be greater than the locus heartbeats over permanent cross-references

Variables

This section is empty.

Functions

func MustParseNetAddr

func MustParseNetAddr(s string) net.Addr

func NewAddr

func NewAddr(id n.WorkerID, pid int, hostport string) (n.Addr, error)

func ParseNetAddr

func ParseNetAddr(s string) (net.Addr, error)

Types

type Addr

type Addr struct {
	ID  n.WorkerID
	PID int
	TCP *net.TCPAddr
}

Addr maintains a single unique instance for each addr. Addr object uniqueness is required by the n.Addr interface.

func NewNetAddr

func NewNetAddr(id n.WorkerID, pid int, addr net.Addr) *Addr

func ParseAddr

func ParseAddr(s string) (*Addr, error)

circuit://123.3.45.0:3456/2345/R1122334455667788

func (*Addr) FileName

func (a *Addr) FileName() string

func (*Addr) NetAddr

func (a *Addr) NetAddr() net.Addr

func (*Addr) String

func (a *Addr) String() string

func (*Addr) WorkerID

func (a *Addr) WorkerID() n.WorkerID

type Conn

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

func NewConn

func NewConn(sub *blend.Conn, addr *Addr) *Conn

func (*Conn) Abort

func (c *Conn) Abort(reason error)

func (*Conn) Addr

func (c *Conn) Addr() n.Addr

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Read

func (c *Conn) Read() (v interface{}, err error)

func (*Conn) Write

func (c *Conn) Write(v interface{}) (err error)

type Dialer

type Dialer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Dialer

func (*Dialer) Dial

func (d *Dialer) Dial(addr n.Addr) (conn n.Conn, err error)

type HelloMsg

type HelloMsg struct {
	SourceAddr n.Addr
	TargetAddr n.Addr
}

Dialer sends HelloMsg to accepter when opening a session to advertise its workerID and local process ID

type Listener

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

Listener

func (*Listener) Accept

func (l *Listener) Accept() n.Conn

func (*Listener) Addr

func (l *Listener) Addr() n.Addr

func (*Listener) Close

func (l *Listener) Close()

type RejectMsg

type RejectMsg struct {
	Err error
}

type System

type System struct{}

System is the high-level type that encloses a monolithic networking functionality

func (*System) NewTransport

func (s *System) NewTransport(workerID n.WorkerID, addr net.Addr, key []byte) n.Transport

workerID is the ID for this transport endpoint. addr is the networking address to listen to.

func (*System) ParseAddr

func (s *System) ParseAddr(a string) (n.Addr, error)

func (*System) ParseNetAddr

func (s *System) ParseNetAddr(a string) (net.Addr, error)

type Transport

type Transport struct {
	n.WorkerID
	*Dialer
	*Listener
}

Transport cumulatively represents the ability to listen for connections and dial into remote endpoints.

type WelcomeMsg

type WelcomeMsg struct{}

Jump to

Keyboard shortcuts

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