Documentation ¶
Index ¶
- func CloudflaredServer_ServerToClient(s SessionManager, c ConfigurationManager) proto.CloudflaredServer
- func ConfigurationManager_ServerToClient(c ConfigurationManager) proto.ConfigurationManager
- func MarshalError(s proto.ConnectionError, err error) error
- func RegistrationServer_ServerToClient(s RegistrationServer) proto.RegistrationServer
- func SessionManager_ServerToClient(s SessionManager) proto.SessionManager
- type ClientInfo
- type CloudflaredServer
- type CloudflaredServer_PogsClient
- type CloudflaredServer_PogsImpl
- type ConfigurationManager
- type ConfigurationManager_PogsClient
- type ConfigurationManager_PogsImpl
- type ConnectRequest
- type ConnectResponse
- type ConnectionDetails
- type ConnectionOptions
- type ConnectionType
- type Metadata
- type RPCError
- type RegisterUdpSessionResponse
- type RegistrationServer
- type RegistrationServer_PogsClient
- func (c RegistrationServer_PogsClient) Close() error
- func (c RegistrationServer_PogsClient) RegisterConnection(ctx context.Context, auth TunnelAuth, tunnelID uuid.UUID, connIndex byte, ...) (*ConnectionDetails, error)
- func (c RegistrationServer_PogsClient) SendLocalConfiguration(ctx context.Context, config []byte) error
- func (c RegistrationServer_PogsClient) UnregisterConnection(ctx context.Context) error
- type RegistrationServer_PogsImpl
- func (i RegistrationServer_PogsImpl) RegisterConnection(p proto.RegistrationServer_registerConnection) error
- func (i RegistrationServer_PogsImpl) UnregisterConnection(p proto.RegistrationServer_unregisterConnection) error
- func (i RegistrationServer_PogsImpl) UpdateLocalConfiguration(p proto.RegistrationServer_updateLocalConfiguration) error
- type RetryableError
- type SessionManager
- type SessionManager_PogsClient
- func (c SessionManager_PogsClient) Close() error
- func (c SessionManager_PogsClient) RegisterUdpSession(ctx context.Context, sessionID uuid.UUID, dstIP net.IP, dstPort uint16, ...) (*RegisterUdpSessionResponse, error)
- func (c SessionManager_PogsClient) UnregisterUdpSession(ctx context.Context, sessionID uuid.UUID, message string) error
- type SessionManager_PogsImpl
- type Tag
- type TunnelAuth
- type UpdateConfigurationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudflaredServer_ServerToClient ¶
func CloudflaredServer_ServerToClient(s SessionManager, c ConfigurationManager) proto.CloudflaredServer
func ConfigurationManager_ServerToClient ¶
func ConfigurationManager_ServerToClient(c ConfigurationManager) proto.ConfigurationManager
func MarshalError ¶
func MarshalError(s proto.ConnectionError, err error) error
func RegistrationServer_ServerToClient ¶
func RegistrationServer_ServerToClient(s RegistrationServer) proto.RegistrationServer
func SessionManager_ServerToClient ¶
func SessionManager_ServerToClient(s SessionManager) proto.SessionManager
Types ¶
type ClientInfo ¶
type CloudflaredServer ¶
type CloudflaredServer interface { SessionManager ConfigurationManager }
type CloudflaredServer_PogsClient ¶
type CloudflaredServer_PogsClient struct { SessionManager_PogsClient ConfigurationManager_PogsClient Client capnp.Client Conn *rpc.Conn }
func NewCloudflaredServer_PogsClient ¶
func NewCloudflaredServer_PogsClient(client capnp.Client, conn *rpc.Conn) CloudflaredServer_PogsClient
func (CloudflaredServer_PogsClient) Close ¶
func (c CloudflaredServer_PogsClient) Close() error
type CloudflaredServer_PogsImpl ¶
type CloudflaredServer_PogsImpl struct { SessionManager_PogsImpl ConfigurationManager_PogsImpl }
type ConfigurationManager ¶
type ConfigurationManager interface { // UpdateConfiguration is the call provided to cloudflared to load the latest remote configuration. UpdateConfiguration(ctx context.Context, version int32, config []byte) *UpdateConfigurationResponse }
type ConfigurationManager_PogsClient ¶
func (ConfigurationManager_PogsClient) Close ¶
func (c ConfigurationManager_PogsClient) Close() error
func (ConfigurationManager_PogsClient) UpdateConfiguration ¶
func (c ConfigurationManager_PogsClient) UpdateConfiguration(ctx context.Context, version int32, config []byte) (*UpdateConfigurationResponse, error)
type ConfigurationManager_PogsImpl ¶
type ConfigurationManager_PogsImpl struct {
// contains filtered or unexported fields
}
func (ConfigurationManager_PogsImpl) UpdateConfiguration ¶
func (i ConfigurationManager_PogsImpl) UpdateConfiguration(p proto.ConfigurationManager_updateConfiguration) error
type ConnectRequest ¶
type ConnectRequest struct { Dest string `capnp:"dest"` Type ConnectionType `capnp:"type"` Metadata []Metadata `capnp:"metadata"` }
ConnectRequest is the representation of metadata sent at the start of a QUIC application handshake.
func (*ConnectRequest) MetadataMap ¶
func (r *ConnectRequest) MetadataMap() map[string]string
MetadataMap returns a map format of []Metadata.
type ConnectResponse ¶
ConnectResponse is a representation of metadata sent as a response to a QUIC application handshake.
type ConnectionDetails ¶
func (*ConnectionDetails) MarshalCapnproto ¶
func (details *ConnectionDetails) MarshalCapnproto(s proto.ConnectionDetails) error
func (*ConnectionDetails) UnmarshalCapnproto ¶
func (details *ConnectionDetails) UnmarshalCapnproto(s proto.ConnectionDetails) error
type ConnectionOptions ¶
type ConnectionOptions struct { Client ClientInfo OriginLocalIP net.IP `capnp:"originLocalIp"` ReplaceExisting bool CompressionQuality uint8 NumPreviousAttempts uint8 }
func (*ConnectionOptions) MarshalCapnproto ¶
func (p *ConnectionOptions) MarshalCapnproto(s proto.ConnectionOptions) error
func (*ConnectionOptions) UnmarshalCapnproto ¶
func (p *ConnectionOptions) UnmarshalCapnproto(s proto.ConnectionOptions) error
type ConnectionType ¶
type ConnectionType uint16
ConnectionType indicates the type of underlying connection proxied within the QUIC stream.
const ( ConnectionTypeHTTP ConnectionType = iota ConnectionTypeWebsocket ConnectionTypeTCP )
func (ConnectionType) String ¶
func (c ConnectionType) String() string
type RPCError ¶
type RPCError struct {
// contains filtered or unexported fields
}
RPCError is used to indicate errors returned by the RPC subsystem rather than failure of a remote operation
type RegisterUdpSessionResponse ¶
func (*RegisterUdpSessionResponse) Marshal ¶
func (p *RegisterUdpSessionResponse) Marshal(s proto.RegisterUdpSessionResponse) error
func (*RegisterUdpSessionResponse) Unmarshal ¶
func (p *RegisterUdpSessionResponse) Unmarshal(s proto.RegisterUdpSessionResponse) error
type RegistrationServer ¶
type RegistrationServer interface { // RegisterConnection is the call typically handled by the edge to initiate and authenticate a new connection // for cloudflared. RegisterConnection(ctx context.Context, auth TunnelAuth, tunnelID uuid.UUID, connIndex byte, options *ConnectionOptions) (*ConnectionDetails, error) // UnregisterConnection is the call typically handled by the edge to close an existing connection for cloudflared. UnregisterConnection(ctx context.Context) // UpdateLocalConfiguration is the call typically handled by the edge for cloudflared to provide the current // configuration it is operating with. UpdateLocalConfiguration(ctx context.Context, config []byte) error }
type RegistrationServer_PogsClient ¶
func NewRegistrationServer_PogsClient ¶
func NewRegistrationServer_PogsClient(client capnp.Client, conn *rpc.Conn) RegistrationServer_PogsClient
func (RegistrationServer_PogsClient) Close ¶
func (c RegistrationServer_PogsClient) Close() error
func (RegistrationServer_PogsClient) RegisterConnection ¶
func (c RegistrationServer_PogsClient) RegisterConnection(ctx context.Context, auth TunnelAuth, tunnelID uuid.UUID, connIndex byte, options *ConnectionOptions) (*ConnectionDetails, error)
func (RegistrationServer_PogsClient) SendLocalConfiguration ¶
func (c RegistrationServer_PogsClient) SendLocalConfiguration(ctx context.Context, config []byte) error
func (RegistrationServer_PogsClient) UnregisterConnection ¶
func (c RegistrationServer_PogsClient) UnregisterConnection(ctx context.Context) error
type RegistrationServer_PogsImpl ¶
type RegistrationServer_PogsImpl struct {
// contains filtered or unexported fields
}
func (RegistrationServer_PogsImpl) RegisterConnection ¶
func (i RegistrationServer_PogsImpl) RegisterConnection(p proto.RegistrationServer_registerConnection) error
func (RegistrationServer_PogsImpl) UnregisterConnection ¶
func (i RegistrationServer_PogsImpl) UnregisterConnection(p proto.RegistrationServer_unregisterConnection) error
func (RegistrationServer_PogsImpl) UpdateLocalConfiguration ¶
func (i RegistrationServer_PogsImpl) UpdateLocalConfiguration(p proto.RegistrationServer_updateLocalConfiguration) error
type RetryableError ¶
func RetryErrorAfter ¶
func RetryErrorAfter(err error, delay time.Duration) *RetryableError
RetryErrorAfter wraps err to indicate that client should retry after delay
func (*RetryableError) Error ¶
func (re *RetryableError) Error() string
func (*RetryableError) Unwrap ¶
func (re *RetryableError) Unwrap() error
type SessionManager ¶
type SessionManager interface { // RegisterUdpSession is the call provided to cloudflared to handle an incoming // capnproto RegisterUdpSession request from the edge. RegisterUdpSession(ctx context.Context, sessionID uuid.UUID, dstIP net.IP, dstPort uint16, closeAfterIdleHint time.Duration, traceContext string) (*RegisterUdpSessionResponse, error) // UnregisterUdpSession is the call provided to cloudflared to handle an incoming // capnproto UnregisterUdpSession request from the edge. UnregisterUdpSession(ctx context.Context, sessionID uuid.UUID, message string) error }
type SessionManager_PogsClient ¶
func NewSessionManager_PogsClient ¶
func NewSessionManager_PogsClient(client capnp.Client, conn *rpc.Conn) SessionManager_PogsClient
func (SessionManager_PogsClient) Close ¶
func (c SessionManager_PogsClient) Close() error
func (SessionManager_PogsClient) RegisterUdpSession ¶
func (SessionManager_PogsClient) UnregisterUdpSession ¶
type SessionManager_PogsImpl ¶
type SessionManager_PogsImpl struct {
// contains filtered or unexported fields
}
func (SessionManager_PogsImpl) RegisterUdpSession ¶
func (i SessionManager_PogsImpl) RegisterUdpSession(p proto.SessionManager_registerUdpSession) error
func (SessionManager_PogsImpl) UnregisterUdpSession ¶
func (i SessionManager_PogsImpl) UnregisterUdpSession(p proto.SessionManager_unregisterUdpSession) error
type Tag ¶
Tag previously was a legacy tunnel capnp struct but was deprecated. To help reduce the amount of changes imposed by removing this simple struct, it was copied out of the capnp and provided here instead.
type TunnelAuth ¶
func (*TunnelAuth) MarshalCapnproto ¶
func (a *TunnelAuth) MarshalCapnproto(s proto.TunnelAuth) error
func (*TunnelAuth) UnmarshalCapnproto ¶
func (a *TunnelAuth) UnmarshalCapnproto(s proto.TunnelAuth) error
type UpdateConfigurationResponse ¶
type UpdateConfigurationResponse struct { LastAppliedVersion int32 `json:"lastAppliedVersion"` Err error `json:"err"` }
func (*UpdateConfigurationResponse) Marshal ¶
func (p *UpdateConfigurationResponse) Marshal(s proto.UpdateConfigurationResponse) error
func (*UpdateConfigurationResponse) Unmarshal ¶
func (p *UpdateConfigurationResponse) Unmarshal(s proto.UpdateConfigurationResponse) error