tunnelrpc

package
v0.0.0-...-31b9ebf Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientConn

func NewClientConn(transport rpc.Transport) *rpc.Conn

func NewServerConn

func NewServerConn(transport rpc.Transport, client capnp.Client) *rpc.Conn

func SafeTransport

func SafeTransport(rw io.ReadWriteCloser) rpc.Transport

Types

type RegistrationClient

type RegistrationClient interface {
	RegisterConnection(
		ctx context.Context,
		auth pogs.TunnelAuth,
		tunnelID uuid.UUID,
		options *pogs.ConnectionOptions,
		connIndex uint8,
		edgeAddress net.IP,
	) (*pogs.ConnectionDetails, error)
	SendLocalConfiguration(ctx context.Context, config []byte) error
	GracefulShutdown(ctx context.Context, gracePeriod time.Duration) error
	Close()
}

func NewRegistrationClient

func NewRegistrationClient(ctx context.Context, stream io.ReadWriteCloser, requestTimeout time.Duration) RegistrationClient

type RegistrationServer

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

RegistrationServer provides a handler interface for a client to provide methods to handle the different types of requests that can be communicated by the stream.

func NewRegistrationServer

func NewRegistrationServer(registrationServer pogs.RegistrationServer) *RegistrationServer

func (*RegistrationServer) Serve

func (s *RegistrationServer) Serve(ctx context.Context, stream io.ReadWriteCloser) error

Serve listens for all RegistrationServer RPCs, including UnregisterConnection until the underlying connection is terminated.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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