Documentation ¶
Index ¶
- type HandleRequestFunc
- type RequestClientStream
- type RequestServerStream
- type SessionClient
- func (c *SessionClient) Close()
- func (c *SessionClient) RegisterUdpSession(ctx context.Context, sessionID uuid.UUID, dstIP net.IP, dstPort uint16, ...) (*pogs.RegisterUdpSessionResponse, error)
- func (c *SessionClient) UnregisterUdpSession(ctx context.Context, sessionID uuid.UUID, message string) error
- type SessionManagerServer
- type TunnellinkClient
- func (c *TunnellinkClient) Close()
- func (c *TunnellinkClient) RegisterUdpSession(ctx context.Context, sessionID uuid.UUID, dstIP net.IP, dstPort uint16, ...) (*pogs.RegisterUdpSessionResponse, error)
- func (c *TunnellinkClient) UnregisterUdpSession(ctx context.Context, sessionID uuid.UUID, message string) error
- func (c *TunnellinkClient) UpdateConfiguration(ctx context.Context, version int32, config []byte) (*pogs.UpdateConfigurationResponse, error)
- type TunnellinkServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandleRequestFunc ¶
type HandleRequestFunc = func(ctx context.Context, stream *RequestServerStream) error
HandleRequestFunc wraps the proxied request from the upstream and also provides methods on the stream to handle the response back.
type RequestClientStream ¶
type RequestClientStream struct {
io.ReadWriteCloser
}
RequestClientStream is a stream to provide requests to the server. This operation is typically driven by the edge service.
func (*RequestClientStream) ReadConnectResponseData ¶
func (rcs *RequestClientStream) ReadConnectResponseData() (*pogs.ConnectResponse, error)
ReadConnectResponseData reads the response from the rpc stream to a ConnectResponse.
func (*RequestClientStream) WriteConnectRequestData ¶
func (rcs *RequestClientStream) WriteConnectRequestData(dest string, connectionType pogs.ConnectionType, metadata ...pogs.Metadata) error
WriteConnectRequestData writes requestMeta to a stream.
type RequestServerStream ¶
type RequestServerStream struct {
io.ReadWriteCloser
}
RequestServerStream is a stream to serve requests
func (*RequestServerStream) ReadConnectRequestData ¶
func (rss *RequestServerStream) ReadConnectRequestData() (*pogs.ConnectRequest, error)
ReadConnectRequestData reads the handshake data from a QUIC stream.
func (*RequestServerStream) WriteConnectResponseData ¶
func (rss *RequestServerStream) WriteConnectResponseData(respErr error, metadata ...pogs.Metadata) error
WriteConnectResponseData writes response to a QUIC stream.
type SessionClient ¶
type SessionClient struct {
// contains filtered or unexported fields
}
SessionClient calls capnp rpc methods of SessionManager.
func NewSessionClient ¶
func NewSessionClient(ctx context.Context, stream io.ReadWriteCloser, requestTimeout time.Duration) (*SessionClient, error)
func (*SessionClient) Close ¶
func (c *SessionClient) Close()
func (*SessionClient) RegisterUdpSession ¶
func (*SessionClient) UnregisterUdpSession ¶
type SessionManagerServer ¶
type SessionManagerServer struct {
// contains filtered or unexported fields
}
SessionManagerServer handles streams with the SessionManager RPCs.
func NewSessionManagerServer ¶
func NewSessionManagerServer(sessionManager pogs.SessionManager, responseTimeout time.Duration) *SessionManagerServer
func (*SessionManagerServer) Serve ¶
func (s *SessionManagerServer) Serve(ctx context.Context, stream io.ReadWriteCloser) error
type TunnellinkClient ¶
type TunnellinkClient struct {
// contains filtered or unexported fields
}
TunnellinkClient calls capnp rpc methods of SessionManager and ConfigurationManager.
func NewTunnellinkClient ¶
func NewTunnellinkClient(ctx context.Context, stream io.ReadWriteCloser, requestTimeout time.Duration) (*TunnellinkClient, error)
func (*TunnellinkClient) Close ¶
func (c *TunnellinkClient) Close()
func (*TunnellinkClient) RegisterUdpSession ¶
func (*TunnellinkClient) UnregisterUdpSession ¶
func (*TunnellinkClient) UpdateConfiguration ¶
func (c *TunnellinkClient) UpdateConfiguration(ctx context.Context, version int32, config []byte) (*pogs.UpdateConfigurationResponse, error)
type TunnellinkServer ¶
type TunnellinkServer struct {
// contains filtered or unexported fields
}
TunnellinkServer 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 NewTunnellinkServer ¶
func NewTunnellinkServer(handleRequest HandleRequestFunc, sessionManager pogs.SessionManager, configManager pogs.ConfigurationManager, responseTimeout time.Duration) *TunnellinkServer
func (*TunnellinkServer) Serve ¶
func (s *TunnellinkServer) Serve(ctx context.Context, stream io.ReadWriteCloser) error
Serve executes the defined handlers in ServerStream on the provided stream if it is a proper RPC stream with the correct preamble protocol signature.