grpctun

package
v2.2.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	net.Conn
	Wait() error
}

Conn is a net.Conn, plus a Wait() method.

func AcceptFromSystemA

func AcceptFromSystemA(systema manager.ManagerProxy_HandleConnectionServer) (interceptID string, conn Conn, err error)

AcceptFromSystemA is used by a Telepresence manger to accept a connection from SystemA.

func DialToManager

func DialToManager(ctx context.Context, managerClient manager.ManagerProxyClient, interceptID string, opts ...grpc.CallOption) (Conn, error)

DialToManager uses a ReverseConnection to dial from SystemA to a Telepresence manager.

func Wrap

func Wrap(impl ReverseConnectionImpl) Conn

Wrap takes a systema.SystemAProxy_ReverseConnectionClient or systema.SystemAProxy_ReverseConnectionServer and wraps it so that it can be used as a net.Conn.

type ReverseConnectionImpl

type ReverseConnectionImpl interface {
	Send(*systema.Chunk) error
	Recv() (*systema.Chunk, error)
}

ReverseConnectionImpl is the intersection of these two interfaces:

systema.SystemAProxy_ReverseConnectionClient
systema.SystemAProxy_ReverseConnectionServer

Jump to

Keyboard shortcuts

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