grpcproxyserver

package
v0.0.0-...-a8fef42 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: CC0-1.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProtocolToNetwork

func ProtocolToNetwork(proto proxy_grpc.NetworkProtocol) string

Types

type ErrConnect

type ErrConnect struct {
	Err error
}

ErrConnect means an error occurred while connecting to the destination.

func (ErrConnect) Error

func (e ErrConnect) Error() string

func (ErrConnect) Unwrap

func (e ErrConnect) Unwrap() error

type ErrProxy

type ErrProxy struct {
	Err error
}

ErrConnect means an error occurred while forwarding traffic.

func (ErrProxy) Error

func (e ErrProxy) Error() string

func (ErrProxy) Unwrap

func (e ErrProxy) Unwrap() error

type ErrResolve

type ErrResolve struct {
	Err error
}

ErrResolve means an error occurred while resolving the hostname.

func (ErrResolve) Error

func (e ErrResolve) Error() string

func (ErrResolve) Unwrap

func (e ErrResolve) Unwrap() error

type GRPCProxyServer

type GRPCProxyServer struct {
	NextConnectionID atomic.Uint64
	ConnectionMap    sync.Map

	proxy_grpc.UnimplementedNetworkProxyServer
}

GRPCProxyServer is the implementation of the gRPC proxy server.

func New

func New() *GRPCProxyServer

New returns a new instance of GRPCProxyServer

func (*GRPCProxyServer) Proxy

func (srv *GRPCProxyServer) Proxy(proxyServer proxy_grpc.NetworkProxy_ProxyServer) error

Proxy implements NetworkProxyServer.

Jump to

Keyboard shortcuts

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