transport

package
v0.0.0-...-5ba556e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrForceReconnect  = errors.New("timeout (500ms) dispatching open session, forcing client to reconnect")
	ErrUnsupportedType = errors.New("connection type is not supported")
)

Functions

func DispatchDisconnect

func DispatchDisconnect(req *types.Client) error

DispatchDisconnect cancel the context of the stateful connection forcing the client to disconnect

func DispatchOpenSession

func DispatchOpenSession(req *types.Client) (*pb.Packet, error)

DispatchOpenSession will trigger the open session phase logic when calling this function. It will wait until it receives a response or timeout.

A proxy manager client needs to be connected for this function to work properly

Types

type Server

type Server struct {
	pb.UnimplementedTransportServer

	TLSConfig     *tls.Config
	ReviewService review.Service
	IDProvider    *idp.Provider
	ApiHostname   string
}

func (*Server) Connect

func (s *Server) Connect(stream pb.Transport_ConnectServer) (err error)

func (*Server) PreConnect

func (s *Server) PreConnect(ctx context.Context, req *pb.PreConnectRequest) (*pb.PreConnectResponse, error)

func (*Server) ReviewStatusChange

func (s *Server) ReviewStatusChange(rev *types.Review)

func (*Server) StartRPCServer

func (s *Server) StartRPCServer()

Directories

Path Synopsis
interceptors
plugins
dlp

Jump to

Keyboard shortcuts

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