Documentation
¶
Index ¶
- Constants
- Variables
- func DRPCRegisterSignaling(mux drpc.Mux, impl DRPCSignalingServer) error
- func NewSRPCSignalingHandler(impl SRPCSignalingServer, serviceID string) srpc.Handler
- func SRPCRegisterSignaling(mux srpc.Mux, impl SRPCSignalingServer) error
- type DRPCSignalingClient
- type DRPCSignalingDescription
- type DRPCSignalingServer
- type DRPCSignalingUnimplementedServer
- type DRPCSignaling_ListenClient
- type DRPCSignaling_ListenStream
- type DRPCSignaling_SessionClient
- type DRPCSignaling_SessionStream
- type ListenRequest
- func (m *ListenRequest) CloneMessageVT() proto.Message
- func (m *ListenRequest) CloneVT() *ListenRequest
- func (*ListenRequest) Descriptor() ([]byte, []int)deprecated
- func (this *ListenRequest) EqualMessageVT(thatMsg proto.Message) bool
- func (this *ListenRequest) EqualVT(that *ListenRequest) bool
- func (m *ListenRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ListenRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *ListenRequest) MarshalVT() (dAtA []byte, err error)
- func (*ListenRequest) ProtoMessage()
- func (x *ListenRequest) ProtoReflect() protoreflect.Message
- func (x *ListenRequest) Reset()
- func (m *ListenRequest) SizeVT() (n int)
- func (x *ListenRequest) String() string
- func (m *ListenRequest) UnmarshalVT(dAtA []byte) error
- func (r *ListenRequest) Validate() error
- type ListenResponse
- func (m *ListenResponse) CloneMessageVT() proto.Message
- func (m *ListenResponse) CloneVT() *ListenResponse
- func (*ListenResponse) Descriptor() ([]byte, []int)deprecated
- func (this *ListenResponse) EqualMessageVT(thatMsg proto.Message) bool
- func (this *ListenResponse) EqualVT(that *ListenResponse) bool
- func (m *ListenResponse) GetBody() isListenResponse_Body
- func (x *ListenResponse) GetClearPeer() string
- func (x *ListenResponse) GetSetPeer() string
- func (m *ListenResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ListenResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *ListenResponse) MarshalVT() (dAtA []byte, err error)
- func (*ListenResponse) ProtoMessage()
- func (x *ListenResponse) ProtoReflect() protoreflect.Message
- func (x *ListenResponse) Reset()
- func (m *ListenResponse) SizeVT() (n int)
- func (x *ListenResponse) String() string
- func (m *ListenResponse) UnmarshalVT(dAtA []byte) error
- type ListenResponse_ClearPeer
- func (m *ListenResponse_ClearPeer) CloneVT() isListenResponse_Body
- func (this *ListenResponse_ClearPeer) EqualVT(thatIface isListenResponse_Body) bool
- func (m *ListenResponse_ClearPeer) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ListenResponse_ClearPeer) MarshalToVT(dAtA []byte) (int, error)
- func (m *ListenResponse_ClearPeer) SizeVT() (n int)
- type ListenResponse_SetPeer
- func (m *ListenResponse_SetPeer) CloneVT() isListenResponse_Body
- func (this *ListenResponse_SetPeer) EqualVT(thatIface isListenResponse_Body) bool
- func (m *ListenResponse_SetPeer) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ListenResponse_SetPeer) MarshalToVT(dAtA []byte) (int, error)
- func (m *ListenResponse_SetPeer) SizeVT() (n int)
- type SRPCSignalingClient
- type SRPCSignalingHandler
- func (SRPCSignalingHandler) GetMethodIDs() []string
- func (d *SRPCSignalingHandler) GetServiceID() string
- func (d *SRPCSignalingHandler) InvokeMethod(serviceID, methodID string, strm srpc.Stream) (bool, error)
- func (SRPCSignalingHandler) InvokeMethod_Listen(impl SRPCSignalingServer, strm srpc.Stream) error
- func (SRPCSignalingHandler) InvokeMethod_Session(impl SRPCSignalingServer, strm srpc.Stream) error
- type SRPCSignalingServer
- type SRPCSignalingUnimplementedServer
- type SRPCSignaling_ListenClient
- type SRPCSignaling_ListenStream
- type SRPCSignaling_SessionClient
- type SRPCSignaling_SessionStream
- type SessionInit
- func (m *SessionInit) CloneMessageVT() proto.Message
- func (m *SessionInit) CloneVT() *SessionInit
- func (*SessionInit) Descriptor() ([]byte, []int)deprecated
- func (this *SessionInit) EqualMessageVT(thatMsg proto.Message) bool
- func (this *SessionInit) EqualVT(that *SessionInit) bool
- func (x *SessionInit) GetPeerId() string
- func (m *SessionInit) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionInit) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionInit) MarshalVT() (dAtA []byte, err error)
- func (s *SessionInit) ParsePeerID() (peer.ID, error)
- func (*SessionInit) ProtoMessage()
- func (x *SessionInit) ProtoReflect() protoreflect.Message
- func (x *SessionInit) Reset()
- func (m *SessionInit) SizeVT() (n int)
- func (x *SessionInit) String() string
- func (m *SessionInit) UnmarshalVT(dAtA []byte) error
- func (i *SessionInit) Validate() error
- type SessionMsg
- func (m *SessionMsg) CloneMessageVT() proto.Message
- func (m *SessionMsg) CloneVT() *SessionMsg
- func (*SessionMsg) Descriptor() ([]byte, []int)deprecated
- func (this *SessionMsg) EqualMessageVT(thatMsg proto.Message) bool
- func (this *SessionMsg) EqualVT(that *SessionMsg) bool
- func (x *SessionMsg) GetSeqno() uint64
- func (x *SessionMsg) GetSignedMsg() *peer.SignedMsg
- func (m *SessionMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionMsg) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionMsg) MarshalVT() (dAtA []byte, err error)
- func (*SessionMsg) ProtoMessage()
- func (x *SessionMsg) ProtoReflect() protoreflect.Message
- func (x *SessionMsg) Reset()
- func (m *SessionMsg) SizeVT() (n int)
- func (x *SessionMsg) String() string
- func (m *SessionMsg) UnmarshalVT(dAtA []byte) error
- func (m *SessionMsg) Validate() error
- type SessionRequest
- func (m *SessionRequest) CloneMessageVT() proto.Message
- func (m *SessionRequest) CloneVT() *SessionRequest
- func (*SessionRequest) Descriptor() ([]byte, []int)deprecated
- func (this *SessionRequest) EqualMessageVT(thatMsg proto.Message) bool
- func (this *SessionRequest) EqualVT(that *SessionRequest) bool
- func (x *SessionRequest) GetAckMsg() uint64
- func (m *SessionRequest) GetBody() isSessionRequest_Body
- func (x *SessionRequest) GetClearMsg() uint64
- func (x *SessionRequest) GetInit() *SessionInit
- func (x *SessionRequest) GetSendMsg() *SessionMsg
- func (x *SessionRequest) GetSessionSeqno() uint64
- func (m *SessionRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionRequest) MarshalVT() (dAtA []byte, err error)
- func (*SessionRequest) ProtoMessage()
- func (x *SessionRequest) ProtoReflect() protoreflect.Message
- func (x *SessionRequest) Reset()
- func (m *SessionRequest) SizeVT() (n int)
- func (x *SessionRequest) String() string
- func (m *SessionRequest) UnmarshalVT(dAtA []byte) error
- func (r *SessionRequest) Validate() error
- type SessionRequest_AckMsg
- func (m *SessionRequest_AckMsg) CloneVT() isSessionRequest_Body
- func (this *SessionRequest_AckMsg) EqualVT(thatIface isSessionRequest_Body) bool
- func (m *SessionRequest_AckMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionRequest_AckMsg) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionRequest_AckMsg) SizeVT() (n int)
- type SessionRequest_ClearMsg
- func (m *SessionRequest_ClearMsg) CloneVT() isSessionRequest_Body
- func (this *SessionRequest_ClearMsg) EqualVT(thatIface isSessionRequest_Body) bool
- func (m *SessionRequest_ClearMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionRequest_ClearMsg) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionRequest_ClearMsg) SizeVT() (n int)
- type SessionRequest_Init
- func (m *SessionRequest_Init) CloneVT() isSessionRequest_Body
- func (this *SessionRequest_Init) EqualVT(thatIface isSessionRequest_Body) bool
- func (m *SessionRequest_Init) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionRequest_Init) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionRequest_Init) SizeVT() (n int)
- type SessionRequest_SendMsg
- func (m *SessionRequest_SendMsg) CloneVT() isSessionRequest_Body
- func (this *SessionRequest_SendMsg) EqualVT(thatIface isSessionRequest_Body) bool
- func (m *SessionRequest_SendMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionRequest_SendMsg) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionRequest_SendMsg) SizeVT() (n int)
- type SessionResponse
- func (m *SessionResponse) CloneMessageVT() proto.Message
- func (m *SessionResponse) CloneVT() *SessionResponse
- func (*SessionResponse) Descriptor() ([]byte, []int)deprecated
- func (this *SessionResponse) EqualMessageVT(thatMsg proto.Message) bool
- func (this *SessionResponse) EqualVT(that *SessionResponse) bool
- func (x *SessionResponse) GetAckMsg() uint64
- func (m *SessionResponse) GetBody() isSessionResponse_Body
- func (x *SessionResponse) GetClearMsg() uint64
- func (x *SessionResponse) GetClosed() bool
- func (x *SessionResponse) GetOpened() uint64
- func (x *SessionResponse) GetRecvMsg() *SessionMsg
- func (m *SessionResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionResponse) MarshalVT() (dAtA []byte, err error)
- func (*SessionResponse) ProtoMessage()
- func (x *SessionResponse) ProtoReflect() protoreflect.Message
- func (x *SessionResponse) Reset()
- func (m *SessionResponse) SizeVT() (n int)
- func (x *SessionResponse) String() string
- func (m *SessionResponse) UnmarshalVT(dAtA []byte) error
- func (r *SessionResponse) Validate() error
- type SessionResponse_AckMsg
- func (m *SessionResponse_AckMsg) CloneVT() isSessionResponse_Body
- func (this *SessionResponse_AckMsg) EqualVT(thatIface isSessionResponse_Body) bool
- func (m *SessionResponse_AckMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionResponse_AckMsg) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionResponse_AckMsg) SizeVT() (n int)
- type SessionResponse_ClearMsg
- func (m *SessionResponse_ClearMsg) CloneVT() isSessionResponse_Body
- func (this *SessionResponse_ClearMsg) EqualVT(thatIface isSessionResponse_Body) bool
- func (m *SessionResponse_ClearMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionResponse_ClearMsg) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionResponse_ClearMsg) SizeVT() (n int)
- type SessionResponse_Closed
- func (m *SessionResponse_Closed) CloneVT() isSessionResponse_Body
- func (this *SessionResponse_Closed) EqualVT(thatIface isSessionResponse_Body) bool
- func (m *SessionResponse_Closed) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionResponse_Closed) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionResponse_Closed) SizeVT() (n int)
- type SessionResponse_Opened
- func (m *SessionResponse_Opened) CloneVT() isSessionResponse_Body
- func (this *SessionResponse_Opened) EqualVT(thatIface isSessionResponse_Body) bool
- func (m *SessionResponse_Opened) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionResponse_Opened) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionResponse_Opened) SizeVT() (n int)
- type SessionResponse_RecvMsg
- func (m *SessionResponse_RecvMsg) CloneVT() isSessionResponse_Body
- func (this *SessionResponse_RecvMsg) EqualVT(thatIface isSessionResponse_Body) bool
- func (m *SessionResponse_RecvMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SessionResponse_RecvMsg) MarshalToVT(dAtA []byte) (int, error)
- func (m *SessionResponse_RecvMsg) SizeVT() (n int)
Constants ¶
const SRPCSignalingServiceID = "signaling.rpc.Signaling"
Variables ¶
var ( ErrUserpedSession = errors.New("signaling: session can only be called once per peer") ErrUserpedListen = errors.New("signaling: listen can only be called once per peer") ErrUnexpectedSessionMsg = errors.New("signaling: unexpected session message") )
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
var File_github_com_aperturerobotics_bifrost_signaling_rpc_signaling_proto protoreflect.FileDescriptor
var ProtocolID = protocol.ID("bifrost/signaling")
ProtocolID is the default protocol ID for the signaling server.
Functions ¶
func DRPCRegisterSignaling ¶
func DRPCRegisterSignaling(mux drpc.Mux, impl DRPCSignalingServer) error
func NewSRPCSignalingHandler ¶
func NewSRPCSignalingHandler(impl SRPCSignalingServer, serviceID string) srpc.Handler
NewSRPCSignalingHandler constructs a new RPC handler. serviceID: if empty, uses default: signaling.rpc.Signaling
func SRPCRegisterSignaling ¶
func SRPCRegisterSignaling(mux srpc.Mux, impl SRPCSignalingServer) error
SRPCRegisterSignaling registers the implementation with the mux. Uses the default serviceID: signaling.rpc.Signaling
Types ¶
type DRPCSignalingClient ¶
type DRPCSignalingClient interface {
DRPCConn() drpc.Conn
Listen(ctx context.Context, in *ListenRequest) (DRPCSignaling_ListenClient, error)
Session(ctx context.Context) (DRPCSignaling_SessionClient, error)
}
func NewDRPCSignalingClient ¶
func NewDRPCSignalingClient(cc drpc.Conn) DRPCSignalingClient
type DRPCSignalingDescription ¶
type DRPCSignalingDescription struct{}
func (DRPCSignalingDescription) NumMethods ¶
func (DRPCSignalingDescription) NumMethods() int
type DRPCSignalingServer ¶
type DRPCSignalingServer interface {
Listen(*ListenRequest, DRPCSignaling_ListenStream) error
Session(DRPCSignaling_SessionStream) error
}
type DRPCSignalingUnimplementedServer ¶
type DRPCSignalingUnimplementedServer struct{}
func (*DRPCSignalingUnimplementedServer) Listen ¶
func (s *DRPCSignalingUnimplementedServer) Listen(*ListenRequest, DRPCSignaling_ListenStream) error
func (*DRPCSignalingUnimplementedServer) Session ¶
func (s *DRPCSignalingUnimplementedServer) Session(DRPCSignaling_SessionStream) error
type DRPCSignaling_ListenClient ¶
type DRPCSignaling_ListenClient interface {
drpc.Stream
Recv() (*ListenResponse, error)
}
type DRPCSignaling_ListenStream ¶
type DRPCSignaling_ListenStream interface {
drpc.Stream
Send(*ListenResponse) error
}
type DRPCSignaling_SessionClient ¶
type DRPCSignaling_SessionClient interface {
drpc.Stream
Send(*SessionRequest) error
Recv() (*SessionResponse, error)
}
type DRPCSignaling_SessionStream ¶
type DRPCSignaling_SessionStream interface {
drpc.Stream
Send(*SessionResponse) error
Recv() (*SessionRequest, error)
}
type ListenRequest ¶
type ListenRequest struct {
// contains filtered or unexported fields
}
ListenRequest is the body of the Listen request.
func (*ListenRequest) CloneMessageVT ¶
func (m *ListenRequest) CloneMessageVT() proto.Message
func (*ListenRequest) CloneVT ¶
func (m *ListenRequest) CloneVT() *ListenRequest
func (*ListenRequest) Descriptor
deprecated
func (*ListenRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListenRequest.ProtoReflect.Descriptor instead.
func (*ListenRequest) EqualMessageVT ¶
func (this *ListenRequest) EqualMessageVT(thatMsg proto.Message) bool
func (*ListenRequest) EqualVT ¶
func (this *ListenRequest) EqualVT(that *ListenRequest) bool
func (*ListenRequest) MarshalToSizedBufferVT ¶
func (m *ListenRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ListenRequest) MarshalToVT ¶
func (m *ListenRequest) MarshalToVT(dAtA []byte) (int, error)
func (*ListenRequest) MarshalVT ¶
func (m *ListenRequest) MarshalVT() (dAtA []byte, err error)
func (*ListenRequest) ProtoMessage ¶
func (*ListenRequest) ProtoMessage()
func (*ListenRequest) ProtoReflect ¶
func (x *ListenRequest) ProtoReflect() protoreflect.Message
func (*ListenRequest) Reset ¶
func (x *ListenRequest) Reset()
func (*ListenRequest) SizeVT ¶
func (m *ListenRequest) SizeVT() (n int)
func (*ListenRequest) String ¶
func (x *ListenRequest) String() string
func (*ListenRequest) UnmarshalVT ¶
func (m *ListenRequest) UnmarshalVT(dAtA []byte) error
func (*ListenRequest) Validate ¶
func (r *ListenRequest) Validate() error
Validate validates the Listen request.
type ListenResponse ¶
type ListenResponse struct {
// Body is the body of the response.
//
// Types that are assignable to Body:
//
// *ListenResponse_SetPeer
// *ListenResponse_ClearPeer
Body isListenResponse_Body `protobuf_oneof:"body"`
// contains filtered or unexported fields
}
ListenResponse is a message sent in a stream in response to Listen.
func (*ListenResponse) CloneMessageVT ¶
func (m *ListenResponse) CloneMessageVT() proto.Message
func (*ListenResponse) CloneVT ¶
func (m *ListenResponse) CloneVT() *ListenResponse
func (*ListenResponse) Descriptor
deprecated
func (*ListenResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListenResponse.ProtoReflect.Descriptor instead.
func (*ListenResponse) EqualMessageVT ¶
func (this *ListenResponse) EqualMessageVT(thatMsg proto.Message) bool
func (*ListenResponse) EqualVT ¶
func (this *ListenResponse) EqualVT(that *ListenResponse) bool
func (*ListenResponse) GetBody ¶
func (m *ListenResponse) GetBody() isListenResponse_Body
func (*ListenResponse) GetClearPeer ¶
func (x *ListenResponse) GetClearPeer() string
func (*ListenResponse) GetSetPeer ¶
func (x *ListenResponse) GetSetPeer() string
func (*ListenResponse) MarshalToSizedBufferVT ¶
func (m *ListenResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ListenResponse) MarshalToVT ¶
func (m *ListenResponse) MarshalToVT(dAtA []byte) (int, error)
func (*ListenResponse) MarshalVT ¶
func (m *ListenResponse) MarshalVT() (dAtA []byte, err error)
func (*ListenResponse) ProtoMessage ¶
func (*ListenResponse) ProtoMessage()
func (*ListenResponse) ProtoReflect ¶
func (x *ListenResponse) ProtoReflect() protoreflect.Message
func (*ListenResponse) Reset ¶
func (x *ListenResponse) Reset()
func (*ListenResponse) SizeVT ¶
func (m *ListenResponse) SizeVT() (n int)
func (*ListenResponse) String ¶
func (x *ListenResponse) String() string
func (*ListenResponse) UnmarshalVT ¶
func (m *ListenResponse) UnmarshalVT(dAtA []byte) error
type ListenResponse_ClearPeer ¶
type ListenResponse_ClearPeer struct {
// ClearPeer marks that a remote peer no longer wants a session.
// The contents of the string is the encoded peer id of the remote peer.
ClearPeer string `protobuf:"bytes,2,opt,name=clear_peer,json=clearPeer,proto3,oneof"`
}
func (*ListenResponse_ClearPeer) CloneVT ¶
func (m *ListenResponse_ClearPeer) CloneVT() isListenResponse_Body
func (*ListenResponse_ClearPeer) EqualVT ¶
func (this *ListenResponse_ClearPeer) EqualVT(thatIface isListenResponse_Body) bool
func (*ListenResponse_ClearPeer) MarshalToSizedBufferVT ¶
func (m *ListenResponse_ClearPeer) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ListenResponse_ClearPeer) MarshalToVT ¶
func (m *ListenResponse_ClearPeer) MarshalToVT(dAtA []byte) (int, error)
func (*ListenResponse_ClearPeer) SizeVT ¶
func (m *ListenResponse_ClearPeer) SizeVT() (n int)
type ListenResponse_SetPeer ¶
type ListenResponse_SetPeer struct {
// SetPeer marks that a remote peer wants a session.
// The contents of the string is the encoded peer id of the remote peer.
SetPeer string `protobuf:"bytes,1,opt,name=set_peer,json=setPeer,proto3,oneof"`
}
func (*ListenResponse_SetPeer) CloneVT ¶
func (m *ListenResponse_SetPeer) CloneVT() isListenResponse_Body
func (*ListenResponse_SetPeer) EqualVT ¶
func (this *ListenResponse_SetPeer) EqualVT(thatIface isListenResponse_Body) bool
func (*ListenResponse_SetPeer) MarshalToSizedBufferVT ¶
func (m *ListenResponse_SetPeer) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ListenResponse_SetPeer) MarshalToVT ¶
func (m *ListenResponse_SetPeer) MarshalToVT(dAtA []byte) (int, error)
func (*ListenResponse_SetPeer) SizeVT ¶
func (m *ListenResponse_SetPeer) SizeVT() (n int)
type SRPCSignalingClient ¶
type SRPCSignalingClient interface {
SRPCClient() srpc.Client
Listen(ctx context.Context, in *ListenRequest) (SRPCSignaling_ListenClient, error)
Session(ctx context.Context) (SRPCSignaling_SessionClient, error)
}
func NewSRPCSignalingClient ¶
func NewSRPCSignalingClient(cc srpc.Client) SRPCSignalingClient
func NewSRPCSignalingClientWithServiceID ¶
func NewSRPCSignalingClientWithServiceID(cc srpc.Client, serviceID string) SRPCSignalingClient
type SRPCSignalingHandler ¶
type SRPCSignalingHandler struct {
// contains filtered or unexported fields
}
func (SRPCSignalingHandler) GetMethodIDs ¶
func (SRPCSignalingHandler) GetMethodIDs() []string
func (*SRPCSignalingHandler) GetServiceID ¶
func (d *SRPCSignalingHandler) GetServiceID() string
func (*SRPCSignalingHandler) InvokeMethod ¶
func (SRPCSignalingHandler) InvokeMethod_Listen ¶
func (SRPCSignalingHandler) InvokeMethod_Listen(impl SRPCSignalingServer, strm srpc.Stream) error
func (SRPCSignalingHandler) InvokeMethod_Session ¶
func (SRPCSignalingHandler) InvokeMethod_Session(impl SRPCSignalingServer, strm srpc.Stream) error
type SRPCSignalingServer ¶
type SRPCSignalingServer interface {
Listen(*ListenRequest, SRPCSignaling_ListenStream) error
Session(SRPCSignaling_SessionStream) error
}
type SRPCSignalingUnimplementedServer ¶
type SRPCSignalingUnimplementedServer struct{}
func (*SRPCSignalingUnimplementedServer) Listen ¶
func (s *SRPCSignalingUnimplementedServer) Listen(*ListenRequest, SRPCSignaling_ListenStream) error
func (*SRPCSignalingUnimplementedServer) Session ¶
func (s *SRPCSignalingUnimplementedServer) Session(SRPCSignaling_SessionStream) error
type SRPCSignaling_ListenClient ¶
type SRPCSignaling_ListenClient interface {
srpc.Stream
Recv() (*ListenResponse, error)
RecvTo(*ListenResponse) error
}
type SRPCSignaling_ListenStream ¶
type SRPCSignaling_ListenStream interface {
srpc.Stream
Send(*ListenResponse) error
SendAndClose(*ListenResponse) error
}
type SRPCSignaling_SessionClient ¶
type SRPCSignaling_SessionClient interface {
srpc.Stream
Send(*SessionRequest) error
Recv() (*SessionResponse, error)
RecvTo(*SessionResponse) error
}
type SRPCSignaling_SessionStream ¶
type SRPCSignaling_SessionStream interface {
srpc.Stream
Send(*SessionResponse) error
SendAndClose(*SessionResponse) error
Recv() (*SessionRequest, error)
}
type SessionInit ¶
type SessionInit struct {
// PeerId is the remote peer id we want to contact.
PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
// contains filtered or unexported fields
}
SessionInit is a message to init a Session.
func (*SessionInit) CloneMessageVT ¶
func (m *SessionInit) CloneMessageVT() proto.Message
func (*SessionInit) CloneVT ¶
func (m *SessionInit) CloneVT() *SessionInit
func (*SessionInit) Descriptor
deprecated
func (*SessionInit) Descriptor() ([]byte, []int)
Deprecated: Use SessionInit.ProtoReflect.Descriptor instead.
func (*SessionInit) EqualMessageVT ¶
func (this *SessionInit) EqualMessageVT(thatMsg proto.Message) bool
func (*SessionInit) EqualVT ¶
func (this *SessionInit) EqualVT(that *SessionInit) bool
func (*SessionInit) GetPeerId ¶
func (x *SessionInit) GetPeerId() string
func (*SessionInit) MarshalToSizedBufferVT ¶
func (m *SessionInit) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionInit) MarshalToVT ¶
func (m *SessionInit) MarshalToVT(dAtA []byte) (int, error)
func (*SessionInit) MarshalVT ¶
func (m *SessionInit) MarshalVT() (dAtA []byte, err error)
func (*SessionInit) ParsePeerID ¶
func (s *SessionInit) ParsePeerID() (peer.ID, error)
ParsePeerID parses the peer ID.
func (*SessionInit) ProtoMessage ¶
func (*SessionInit) ProtoMessage()
func (*SessionInit) ProtoReflect ¶
func (x *SessionInit) ProtoReflect() protoreflect.Message
func (*SessionInit) Reset ¶
func (x *SessionInit) Reset()
func (*SessionInit) SizeVT ¶
func (m *SessionInit) SizeVT() (n int)
func (*SessionInit) String ¶
func (x *SessionInit) String() string
func (*SessionInit) UnmarshalVT ¶
func (m *SessionInit) UnmarshalVT(dAtA []byte) error
func (*SessionInit) Validate ¶
func (i *SessionInit) Validate() error
Validate validates the SessionInit.
type SessionMsg ¶
type SessionMsg struct {
// SignedMsg is the signed message body.
SignedMsg *peer.SignedMsg `protobuf:"bytes,1,opt,name=signed_msg,json=signedMsg,proto3" json:"signed_msg,omitempty"`
// Seqno is the message sequence number for clear and ack.
Seqno uint64 `protobuf:"varint,2,opt,name=seqno,proto3" json:"seqno,omitempty"`
// contains filtered or unexported fields
}
SessionMsg contains a signed message and a sequence number.
func (*SessionMsg) CloneMessageVT ¶
func (m *SessionMsg) CloneMessageVT() proto.Message
func (*SessionMsg) CloneVT ¶
func (m *SessionMsg) CloneVT() *SessionMsg
func (*SessionMsg) Descriptor
deprecated
func (*SessionMsg) Descriptor() ([]byte, []int)
Deprecated: Use SessionMsg.ProtoReflect.Descriptor instead.
func (*SessionMsg) EqualMessageVT ¶
func (this *SessionMsg) EqualMessageVT(thatMsg proto.Message) bool
func (*SessionMsg) EqualVT ¶
func (this *SessionMsg) EqualVT(that *SessionMsg) bool
func (*SessionMsg) GetSeqno ¶
func (x *SessionMsg) GetSeqno() uint64
func (*SessionMsg) GetSignedMsg ¶
func (x *SessionMsg) GetSignedMsg() *peer.SignedMsg
func (*SessionMsg) MarshalToSizedBufferVT ¶
func (m *SessionMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionMsg) MarshalToVT ¶
func (m *SessionMsg) MarshalToVT(dAtA []byte) (int, error)
func (*SessionMsg) MarshalVT ¶
func (m *SessionMsg) MarshalVT() (dAtA []byte, err error)
func (*SessionMsg) ProtoMessage ¶
func (*SessionMsg) ProtoMessage()
func (*SessionMsg) ProtoReflect ¶
func (x *SessionMsg) ProtoReflect() protoreflect.Message
func (*SessionMsg) Reset ¶
func (x *SessionMsg) Reset()
func (*SessionMsg) SizeVT ¶
func (m *SessionMsg) SizeVT() (n int)
func (*SessionMsg) String ¶
func (x *SessionMsg) String() string
func (*SessionMsg) UnmarshalVT ¶
func (m *SessionMsg) UnmarshalVT(dAtA []byte) error
func (*SessionMsg) Validate ¶
func (m *SessionMsg) Validate() error
Validate validates the SessionMsg.
type SessionRequest ¶
type SessionRequest struct {
// SessionSeqno is the session sequence number.
// If this doesn't match the current session no, this pkt will be dropped.
// This should be zero for the init packet.
SessionSeqno uint64 `protobuf:"varint,1,opt,name=session_seqno,json=sessionSeqno,proto3" json:"session_seqno,omitempty"`
// Body is the body of the request.
//
// Types that are assignable to Body:
//
// *SessionRequest_Init
// *SessionRequest_SendMsg
// *SessionRequest_ClearMsg
// *SessionRequest_AckMsg
Body isSessionRequest_Body `protobuf_oneof:"body"`
// contains filtered or unexported fields
}
SessionRequest is a message sent from the client to the server.
func (*SessionRequest) CloneMessageVT ¶
func (m *SessionRequest) CloneMessageVT() proto.Message
func (*SessionRequest) CloneVT ¶
func (m *SessionRequest) CloneVT() *SessionRequest
func (*SessionRequest) Descriptor
deprecated
func (*SessionRequest) Descriptor() ([]byte, []int)
Deprecated: Use SessionRequest.ProtoReflect.Descriptor instead.
func (*SessionRequest) EqualMessageVT ¶
func (this *SessionRequest) EqualMessageVT(thatMsg proto.Message) bool
func (*SessionRequest) EqualVT ¶
func (this *SessionRequest) EqualVT(that *SessionRequest) bool
func (*SessionRequest) GetAckMsg ¶
func (x *SessionRequest) GetAckMsg() uint64
func (*SessionRequest) GetBody ¶
func (m *SessionRequest) GetBody() isSessionRequest_Body
func (*SessionRequest) GetClearMsg ¶
func (x *SessionRequest) GetClearMsg() uint64
func (*SessionRequest) GetInit ¶
func (x *SessionRequest) GetInit() *SessionInit
func (*SessionRequest) GetSendMsg ¶
func (x *SessionRequest) GetSendMsg() *SessionMsg
func (*SessionRequest) GetSessionSeqno ¶
func (x *SessionRequest) GetSessionSeqno() uint64
func (*SessionRequest) MarshalToSizedBufferVT ¶
func (m *SessionRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionRequest) MarshalToVT ¶
func (m *SessionRequest) MarshalToVT(dAtA []byte) (int, error)
func (*SessionRequest) MarshalVT ¶
func (m *SessionRequest) MarshalVT() (dAtA []byte, err error)
func (*SessionRequest) ProtoMessage ¶
func (*SessionRequest) ProtoMessage()
func (*SessionRequest) ProtoReflect ¶
func (x *SessionRequest) ProtoReflect() protoreflect.Message
func (*SessionRequest) Reset ¶
func (x *SessionRequest) Reset()
func (*SessionRequest) SizeVT ¶
func (m *SessionRequest) SizeVT() (n int)
func (*SessionRequest) String ¶
func (x *SessionRequest) String() string
func (*SessionRequest) UnmarshalVT ¶
func (m *SessionRequest) UnmarshalVT(dAtA []byte) error
func (*SessionRequest) Validate ¶
func (r *SessionRequest) Validate() error
Validate validates the Session request.
type SessionRequest_AckMsg ¶
type SessionRequest_AckMsg struct {
// AckMsg acknowledges that the current incoming message was processed.
// If the id doesn't match the current incoming message seqno, does nothing.
AckMsg uint64 `protobuf:"varint,5,opt,name=ack_msg,json=ackMsg,proto3,oneof"`
}
func (*SessionRequest_AckMsg) CloneVT ¶
func (m *SessionRequest_AckMsg) CloneVT() isSessionRequest_Body
func (*SessionRequest_AckMsg) EqualVT ¶
func (this *SessionRequest_AckMsg) EqualVT(thatIface isSessionRequest_Body) bool
func (*SessionRequest_AckMsg) MarshalToSizedBufferVT ¶
func (m *SessionRequest_AckMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionRequest_AckMsg) MarshalToVT ¶
func (m *SessionRequest_AckMsg) MarshalToVT(dAtA []byte) (int, error)
func (*SessionRequest_AckMsg) SizeVT ¶
func (m *SessionRequest_AckMsg) SizeVT() (n int)
type SessionRequest_ClearMsg ¶
type SessionRequest_ClearMsg struct {
// ClearMsg clears a previously sent message from the outbox.
// If the sequence number does not match, does nothing.
ClearMsg uint64 `protobuf:"varint,4,opt,name=clear_msg,json=clearMsg,proto3,oneof"`
}
func (*SessionRequest_ClearMsg) CloneVT ¶
func (m *SessionRequest_ClearMsg) CloneVT() isSessionRequest_Body
func (*SessionRequest_ClearMsg) EqualVT ¶
func (this *SessionRequest_ClearMsg) EqualVT(thatIface isSessionRequest_Body) bool
func (*SessionRequest_ClearMsg) MarshalToSizedBufferVT ¶
func (m *SessionRequest_ClearMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionRequest_ClearMsg) MarshalToVT ¶
func (m *SessionRequest_ClearMsg) MarshalToVT(dAtA []byte) (int, error)
func (*SessionRequest_ClearMsg) SizeVT ¶
func (m *SessionRequest_ClearMsg) SizeVT() (n int)
type SessionRequest_Init ¶
type SessionRequest_Init struct {
// Init initializes the session setting which peer to contact.
Init *SessionInit `protobuf:"bytes,2,opt,name=init,proto3,oneof"`
}
func (*SessionRequest_Init) CloneVT ¶
func (m *SessionRequest_Init) CloneVT() isSessionRequest_Body
func (*SessionRequest_Init) EqualVT ¶
func (this *SessionRequest_Init) EqualVT(thatIface isSessionRequest_Body) bool
func (*SessionRequest_Init) MarshalToSizedBufferVT ¶
func (m *SessionRequest_Init) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionRequest_Init) MarshalToVT ¶
func (m *SessionRequest_Init) MarshalToVT(dAtA []byte) (int, error)
func (*SessionRequest_Init) SizeVT ¶
func (m *SessionRequest_Init) SizeVT() (n int)
type SessionRequest_SendMsg ¶
type SessionRequest_SendMsg struct {
// SendMsg sends a signed message to the remote peer.
// The server will buffer at most one message for the remote peer at a time.
// If there is an existing pending outgoing message this will overwrite it.
// Wait for the message received ack before sending again to avoid overwriting.
// The signature must match the peer id associated with the rpc session.
SendMsg *SessionMsg `protobuf:"bytes,3,opt,name=send_msg,json=sendMsg,proto3,oneof"`
}
func (*SessionRequest_SendMsg) CloneVT ¶
func (m *SessionRequest_SendMsg) CloneVT() isSessionRequest_Body
func (*SessionRequest_SendMsg) EqualVT ¶
func (this *SessionRequest_SendMsg) EqualVT(thatIface isSessionRequest_Body) bool
func (*SessionRequest_SendMsg) MarshalToSizedBufferVT ¶
func (m *SessionRequest_SendMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionRequest_SendMsg) MarshalToVT ¶
func (m *SessionRequest_SendMsg) MarshalToVT(dAtA []byte) (int, error)
func (*SessionRequest_SendMsg) SizeVT ¶
func (m *SessionRequest_SendMsg) SizeVT() (n int)
type SessionResponse ¶
type SessionResponse struct {
// Body is the body of the request.
//
// Types that are assignable to Body:
//
// *SessionResponse_Opened
// *SessionResponse_Closed
// *SessionResponse_RecvMsg
// *SessionResponse_ClearMsg
// *SessionResponse_AckMsg
Body isSessionResponse_Body `protobuf_oneof:"body"`
// contains filtered or unexported fields
}
SessionResponse is a message sent from the server to the client.
func (*SessionResponse) CloneMessageVT ¶
func (m *SessionResponse) CloneMessageVT() proto.Message
func (*SessionResponse) CloneVT ¶
func (m *SessionResponse) CloneVT() *SessionResponse
func (*SessionResponse) Descriptor
deprecated
func (*SessionResponse) Descriptor() ([]byte, []int)
Deprecated: Use SessionResponse.ProtoReflect.Descriptor instead.
func (*SessionResponse) EqualMessageVT ¶
func (this *SessionResponse) EqualMessageVT(thatMsg proto.Message) bool
func (*SessionResponse) EqualVT ¶
func (this *SessionResponse) EqualVT(that *SessionResponse) bool
func (*SessionResponse) GetAckMsg ¶
func (x *SessionResponse) GetAckMsg() uint64
func (*SessionResponse) GetBody ¶
func (m *SessionResponse) GetBody() isSessionResponse_Body
func (*SessionResponse) GetClearMsg ¶
func (x *SessionResponse) GetClearMsg() uint64
func (*SessionResponse) GetClosed ¶
func (x *SessionResponse) GetClosed() bool
func (*SessionResponse) GetOpened ¶
func (x *SessionResponse) GetOpened() uint64
func (*SessionResponse) GetRecvMsg ¶
func (x *SessionResponse) GetRecvMsg() *SessionMsg
func (*SessionResponse) MarshalToSizedBufferVT ¶
func (m *SessionResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionResponse) MarshalToVT ¶
func (m *SessionResponse) MarshalToVT(dAtA []byte) (int, error)
func (*SessionResponse) MarshalVT ¶
func (m *SessionResponse) MarshalVT() (dAtA []byte, err error)
func (*SessionResponse) ProtoMessage ¶
func (*SessionResponse) ProtoMessage()
func (*SessionResponse) ProtoReflect ¶
func (x *SessionResponse) ProtoReflect() protoreflect.Message
func (*SessionResponse) Reset ¶
func (x *SessionResponse) Reset()
func (*SessionResponse) SizeVT ¶
func (m *SessionResponse) SizeVT() (n int)
func (*SessionResponse) String ¶
func (x *SessionResponse) String() string
func (*SessionResponse) UnmarshalVT ¶
func (m *SessionResponse) UnmarshalVT(dAtA []byte) error
func (*SessionResponse) Validate ¶
func (r *SessionResponse) Validate() error
Validate validates the Session response.
NOTE: this checks the signature but not which peer the signature is from. Be sure to additionally check the origin of the signature is what you expect.
type SessionResponse_AckMsg ¶
type SessionResponse_AckMsg struct {
// AckMsg confirms that the outgoing message was sent and acked.
AckMsg uint64 `protobuf:"varint,5,opt,name=ack_msg,json=ackMsg,proto3,oneof"`
}
func (*SessionResponse_AckMsg) CloneVT ¶
func (m *SessionResponse_AckMsg) CloneVT() isSessionResponse_Body
func (*SessionResponse_AckMsg) EqualVT ¶
func (this *SessionResponse_AckMsg) EqualVT(thatIface isSessionResponse_Body) bool
func (*SessionResponse_AckMsg) MarshalToSizedBufferVT ¶
func (m *SessionResponse_AckMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionResponse_AckMsg) MarshalToVT ¶
func (m *SessionResponse_AckMsg) MarshalToVT(dAtA []byte) (int, error)
func (*SessionResponse_AckMsg) SizeVT ¶
func (m *SessionResponse_AckMsg) SizeVT() (n int)
type SessionResponse_ClearMsg ¶
type SessionResponse_ClearMsg struct {
// ClearMsg clears a message from the remote peer previously sent with recv_msg.
// This is sent if the remote peer clears their outgoing message before acked.
ClearMsg uint64 `protobuf:"varint,4,opt,name=clear_msg,json=clearMsg,proto3,oneof"`
}
func (*SessionResponse_ClearMsg) CloneVT ¶
func (m *SessionResponse_ClearMsg) CloneVT() isSessionResponse_Body
func (*SessionResponse_ClearMsg) EqualVT ¶
func (this *SessionResponse_ClearMsg) EqualVT(thatIface isSessionResponse_Body) bool
func (*SessionResponse_ClearMsg) MarshalToSizedBufferVT ¶
func (m *SessionResponse_ClearMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionResponse_ClearMsg) MarshalToVT ¶
func (m *SessionResponse_ClearMsg) MarshalToVT(dAtA []byte) (int, error)
func (*SessionResponse_ClearMsg) SizeVT ¶
func (m *SessionResponse_ClearMsg) SizeVT() (n int)
type SessionResponse_Closed ¶
type SessionResponse_Closed struct {
// Closed indicates the connection w/ the remote peer is closed.
// This is the assumed initial state.
Closed bool `protobuf:"varint,2,opt,name=closed,proto3,oneof"`
}
func (*SessionResponse_Closed) CloneVT ¶
func (m *SessionResponse_Closed) CloneVT() isSessionResponse_Body
func (*SessionResponse_Closed) EqualVT ¶
func (this *SessionResponse_Closed) EqualVT(thatIface isSessionResponse_Body) bool
func (*SessionResponse_Closed) MarshalToSizedBufferVT ¶
func (m *SessionResponse_Closed) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionResponse_Closed) MarshalToVT ¶
func (m *SessionResponse_Closed) MarshalToVT(dAtA []byte) (int, error)
func (*SessionResponse_Closed) SizeVT ¶
func (m *SessionResponse_Closed) SizeVT() (n int)
type SessionResponse_Opened ¶
type SessionResponse_Opened struct {
// Opened indicates the connection w/ the remote peer is open.
// Contains the session nonce, incremented if the peer re-connected.
// If this increments, re-send the outgoing message.
Opened uint64 `protobuf:"varint,1,opt,name=opened,proto3,oneof"`
}
func (*SessionResponse_Opened) CloneVT ¶
func (m *SessionResponse_Opened) CloneVT() isSessionResponse_Body
func (*SessionResponse_Opened) EqualVT ¶
func (this *SessionResponse_Opened) EqualVT(thatIface isSessionResponse_Body) bool
func (*SessionResponse_Opened) MarshalToSizedBufferVT ¶
func (m *SessionResponse_Opened) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionResponse_Opened) MarshalToVT ¶
func (m *SessionResponse_Opened) MarshalToVT(dAtA []byte) (int, error)
func (*SessionResponse_Opened) SizeVT ¶
func (m *SessionResponse_Opened) SizeVT() (n int)
type SessionResponse_RecvMsg ¶
type SessionResponse_RecvMsg struct {
// RecvMsg transfers a message sent by the remote peer.
// Send ACK once the message has been processed.
RecvMsg *SessionMsg `protobuf:"bytes,3,opt,name=recv_msg,json=recvMsg,proto3,oneof"`
}
func (*SessionResponse_RecvMsg) CloneVT ¶
func (m *SessionResponse_RecvMsg) CloneVT() isSessionResponse_Body
func (*SessionResponse_RecvMsg) EqualVT ¶
func (this *SessionResponse_RecvMsg) EqualVT(thatIface isSessionResponse_Body) bool
func (*SessionResponse_RecvMsg) MarshalToSizedBufferVT ¶
func (m *SessionResponse_RecvMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*SessionResponse_RecvMsg) MarshalToVT ¶
func (m *SessionResponse_RecvMsg) MarshalToVT(dAtA []byte) (int, error)
func (*SessionResponse_RecvMsg) SizeVT ¶
func (m *SessionResponse_RecvMsg) SizeVT() (n int)