remote

package
v0.13.0-beta4 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package remote provides a client/server architecture for connecting to and hosting a remote forwarding endpoint.

Index

Constants

This section is empty.

Variables

View Source
var File_forwarding_endpoint_remote_protocol_proto protoreflect.FileDescriptor

Functions

func NewEndpoint

func NewEndpoint(
	stream io.ReadWriteCloser,
	version forwarding.Version,
	configuration *forwarding.Configuration,
	protocol string,
	address string,
	source bool,
) (forwarding.Endpoint, error)

NewEndpoint creates a new remote forwarding.Endpoint operating over the specified stream with the specified metadata. If this function fails, then the provided stream will be closed. Once the endpoint has been established, the underlying stream is owned by the endpoint and will be closed when the endpoint is shut down. The provided stream must unblock read and write operations when closed.

func ServeEndpoint

func ServeEndpoint(logger *logging.Logger, stream io.ReadWriteCloser) error

ServeEndpoint creates and serves a remote endpoint on the specified stream. It enforces that the provided stream is closed by the time this function returns, regardless of failure. The provided stream must unblock read and write operations when closed.

Types

type InitializeForwardingRequest

type InitializeForwardingRequest struct {

	// Field 1 is reserved for the session identifier.
	// Version is the session version.
	Version forwarding.Version `protobuf:"varint,2,opt,name=version,proto3,enum=forwarding.Version" json:"version,omitempty"`
	// Configuration is the session configuration.
	Configuration *forwarding.Configuration `protobuf:"bytes,3,opt,name=configuration,proto3" json:"configuration,omitempty"`
	// Protocol is the protocol specification for the listener/dialer.
	Protocol string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"`
	// Address it the bind address for a listener or dial address for a dialer.
	Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"`
	// Listener indicates whether this endpoint should function as a listener or
	// dialer for the associated address.
	Listener bool `protobuf:"varint,6,opt,name=listener,proto3" json:"listener,omitempty"`
	// contains filtered or unexported fields
}

InitializeForwardingRequest is the initialization request sent to remote forwarding endpoints.

func (*InitializeForwardingRequest) Descriptor deprecated

func (*InitializeForwardingRequest) Descriptor() ([]byte, []int)

Deprecated: Use InitializeForwardingRequest.ProtoReflect.Descriptor instead.

func (*InitializeForwardingRequest) GetAddress

func (x *InitializeForwardingRequest) GetAddress() string

func (*InitializeForwardingRequest) GetConfiguration

func (x *InitializeForwardingRequest) GetConfiguration() *forwarding.Configuration

func (*InitializeForwardingRequest) GetListener

func (x *InitializeForwardingRequest) GetListener() bool

func (*InitializeForwardingRequest) GetProtocol

func (x *InitializeForwardingRequest) GetProtocol() string

func (*InitializeForwardingRequest) GetVersion

func (*InitializeForwardingRequest) ProtoMessage

func (*InitializeForwardingRequest) ProtoMessage()

func (*InitializeForwardingRequest) ProtoReflect added in v0.12.0

func (*InitializeForwardingRequest) Reset

func (x *InitializeForwardingRequest) Reset()

func (*InitializeForwardingRequest) String

func (x *InitializeForwardingRequest) String() string

type InitializeForwardingResponse

type InitializeForwardingResponse struct {

	// Error is any error that occurred during initialization.
	Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

InitializeForwardingResponse is the initialization response sent from remote forwarding endpoint.

func (*InitializeForwardingResponse) Descriptor deprecated

func (*InitializeForwardingResponse) Descriptor() ([]byte, []int)

Deprecated: Use InitializeForwardingResponse.ProtoReflect.Descriptor instead.

func (*InitializeForwardingResponse) GetError

func (x *InitializeForwardingResponse) GetError() string

func (*InitializeForwardingResponse) ProtoMessage

func (*InitializeForwardingResponse) ProtoMessage()

func (*InitializeForwardingResponse) ProtoReflect added in v0.12.0

func (*InitializeForwardingResponse) Reset

func (x *InitializeForwardingResponse) Reset()

func (*InitializeForwardingResponse) String

Jump to

Keyboard shortcuts

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