Documentation ¶
Index ¶
- Variables
- func RegisterServerRPCServer(s grpc.ServiceRegistrar, srv ServerRPCServer)
- type CheckBloomReq
- func (*CheckBloomReq) Descriptor() ([]byte, []int)deprecated
- func (x *CheckBloomReq) GetBloom() []byte
- func (x *CheckBloomReq) GetId() string
- func (*CheckBloomReq) ProtoMessage()
- func (x *CheckBloomReq) ProtoReflect() protoreflect.Message
- func (x *CheckBloomReq) Reset()
- func (x *CheckBloomReq) String() string
- type CheckBloomRes
- type FwdOnionsRes
- type Onion
- type OnionMsg
- func (*OnionMsg) Descriptor() ([]byte, []int)deprecated
- func (x *OnionMsg) GetBody() []byte
- func (x *OnionMsg) GetMeta() *OnionMsgMeta
- func (m *OnionMsg) GetMsg() isOnionMsg_Msg
- func (*OnionMsg) ProtoMessage()
- func (x *OnionMsg) ProtoReflect() protoreflect.Message
- func (x *OnionMsg) Reset()
- func (x *OnionMsg) String() string
- type OnionMsgMeta
- type OnionMsg_Body
- type OnionMsg_Meta
- type PConfig
- type RoundEndMsg
- type RoundStartMsg
- type ServerRPCClient
- type ServerRPCServer
- type ServerRPC_FwdOnionsClient
- type ServerRPC_FwdOnionsServer
- type UnimplementedServerRPCServer
- type UnsafeServerRPCServer
Constants ¶
This section is empty.
Variables ¶
var File_server_proto protoreflect.FileDescriptor
var ServerRPC_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpc.ServerRPC", HandlerType: (*ServerRPCServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CheckBloom", Handler: _ServerRPC_CheckBloom_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "FwdOnions", Handler: _ServerRPC_FwdOnions_Handler, ClientStreams: true, }, }, Metadata: "server.proto", }
ServerRPC_ServiceDesc is the grpc.ServiceDesc for ServerRPC service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServerRPCServer ¶
func RegisterServerRPCServer(s grpc.ServiceRegistrar, srv ServerRPCServer)
Types ¶
type CheckBloomReq ¶
type CheckBloomReq struct { Bloom []byte `protobuf:"bytes,1,opt,name=bloom,proto3" json:"bloom,omitempty"` // TODO: Signature Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CheckBloomReq) Descriptor
deprecated
func (*CheckBloomReq) Descriptor() ([]byte, []int)
Deprecated: Use CheckBloomReq.ProtoReflect.Descriptor instead.
func (*CheckBloomReq) GetBloom ¶
func (x *CheckBloomReq) GetBloom() []byte
func (*CheckBloomReq) GetId ¶
func (x *CheckBloomReq) GetId() string
func (*CheckBloomReq) ProtoMessage ¶
func (*CheckBloomReq) ProtoMessage()
func (*CheckBloomReq) ProtoReflect ¶
func (x *CheckBloomReq) ProtoReflect() protoreflect.Message
func (*CheckBloomReq) Reset ¶
func (x *CheckBloomReq) Reset()
func (*CheckBloomReq) String ¶
func (x *CheckBloomReq) String() string
type CheckBloomRes ¶
type CheckBloomRes struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` // contains filtered or unexported fields }
func (*CheckBloomRes) Descriptor
deprecated
func (*CheckBloomRes) Descriptor() ([]byte, []int)
Deprecated: Use CheckBloomRes.ProtoReflect.Descriptor instead.
func (*CheckBloomRes) GetOk ¶
func (x *CheckBloomRes) GetOk() bool
func (*CheckBloomRes) ProtoMessage ¶
func (*CheckBloomRes) ProtoMessage()
func (*CheckBloomRes) ProtoReflect ¶
func (x *CheckBloomRes) ProtoReflect() protoreflect.Message
func (*CheckBloomRes) Reset ¶
func (x *CheckBloomRes) Reset()
func (*CheckBloomRes) String ¶
func (x *CheckBloomRes) String() string
type FwdOnionsRes ¶
type FwdOnionsRes struct {
// contains filtered or unexported fields
}
func (*FwdOnionsRes) Descriptor
deprecated
func (*FwdOnionsRes) Descriptor() ([]byte, []int)
Deprecated: Use FwdOnionsRes.ProtoReflect.Descriptor instead.
func (*FwdOnionsRes) ProtoMessage ¶
func (*FwdOnionsRes) ProtoMessage()
func (*FwdOnionsRes) ProtoReflect ¶
func (x *FwdOnionsRes) ProtoReflect() protoreflect.Message
func (*FwdOnionsRes) Reset ¶
func (x *FwdOnionsRes) Reset()
func (*FwdOnionsRes) String ¶
func (x *FwdOnionsRes) String() string
type Onion ¶
type Onion struct { Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` NextHop string `protobuf:"bytes,2,opt,name=nextHop,proto3" json:"nextHop,omitempty"` DeadDrop string `protobuf:"bytes,3,opt,name=deadDrop,proto3" json:"deadDrop,omitempty"` // contains filtered or unexported fields }
Pre-encoding format of msgs transmitted between servers
func (*Onion) Descriptor
deprecated
func (*Onion) GetDeadDrop ¶
func (*Onion) GetNextHop ¶
func (*Onion) ProtoMessage ¶
func (*Onion) ProtoMessage()
func (*Onion) ProtoReflect ¶
func (x *Onion) ProtoReflect() protoreflect.Message
type OnionMsg ¶
type OnionMsg struct { // Types that are assignable to Msg: // // *OnionMsg_Body // *OnionMsg_Meta Msg isOnionMsg_Msg `protobuf_oneof:"msg"` // contains filtered or unexported fields }
func (*OnionMsg) Descriptor
deprecated
func (*OnionMsg) GetMeta ¶
func (x *OnionMsg) GetMeta() *OnionMsgMeta
func (*OnionMsg) ProtoMessage ¶
func (*OnionMsg) ProtoMessage()
func (*OnionMsg) ProtoReflect ¶
func (x *OnionMsg) ProtoReflect() protoreflect.Message
type OnionMsgMeta ¶
type OnionMsgMeta struct { // Leave empty to indicate the onion is from a client // TODO: Signature Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*OnionMsgMeta) Descriptor
deprecated
func (*OnionMsgMeta) Descriptor() ([]byte, []int)
Deprecated: Use OnionMsgMeta.ProtoReflect.Descriptor instead.
func (*OnionMsgMeta) GetId ¶
func (x *OnionMsgMeta) GetId() string
func (*OnionMsgMeta) ProtoMessage ¶
func (*OnionMsgMeta) ProtoMessage()
func (*OnionMsgMeta) ProtoReflect ¶
func (x *OnionMsgMeta) ProtoReflect() protoreflect.Message
func (*OnionMsgMeta) Reset ¶
func (x *OnionMsgMeta) Reset()
func (*OnionMsgMeta) String ¶
func (x *OnionMsgMeta) String() string
type OnionMsg_Body ¶
type OnionMsg_Body struct {
Body []byte `protobuf:"bytes,1,opt,name=body,proto3,oneof"`
}
type OnionMsg_Meta ¶
type OnionMsg_Meta struct {
Meta *OnionMsgMeta `protobuf:"bytes,2,opt,name=meta,proto3,oneof"`
}
type RoundEndMsg ¶
RoundEndMsg is sent from server to coordinator. For mashaling, see RoundStartMsg.
type RoundStartMsg ¶
type RoundStartMsg struct {
Round int
}
RoundStartMsg is sent from coordinator to server. Use JSON to mashal it since Redis sub/pub transmit string.
type ServerRPCClient ¶
type ServerRPCClient interface { FwdOnions(ctx context.Context, opts ...grpc.CallOption) (ServerRPC_FwdOnionsClient, error) CheckBloom(ctx context.Context, in *CheckBloomReq, opts ...grpc.CallOption) (*CheckBloomRes, error) }
ServerRPCClient is the client API for ServerRPC service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewServerRPCClient ¶
func NewServerRPCClient(cc grpc.ClientConnInterface) ServerRPCClient
type ServerRPCServer ¶
type ServerRPCServer interface { FwdOnions(ServerRPC_FwdOnionsServer) error CheckBloom(context.Context, *CheckBloomReq) (*CheckBloomRes, error) // contains filtered or unexported methods }
ServerRPCServer is the server API for ServerRPC service. All implementations must embed UnimplementedServerRPCServer for forward compatibility
type ServerRPC_FwdOnionsClient ¶
type ServerRPC_FwdOnionsClient interface { Send(*OnionMsg) error CloseAndRecv() (*FwdOnionsRes, error) grpc.ClientStream }
type ServerRPC_FwdOnionsServer ¶
type ServerRPC_FwdOnionsServer interface { SendAndClose(*FwdOnionsRes) error Recv() (*OnionMsg, error) grpc.ServerStream }
type UnimplementedServerRPCServer ¶
type UnimplementedServerRPCServer struct { }
UnimplementedServerRPCServer must be embedded to have forward compatible implementations.
func (UnimplementedServerRPCServer) CheckBloom ¶
func (UnimplementedServerRPCServer) CheckBloom(context.Context, *CheckBloomReq) (*CheckBloomRes, error)
func (UnimplementedServerRPCServer) FwdOnions ¶
func (UnimplementedServerRPCServer) FwdOnions(ServerRPC_FwdOnionsServer) error
type UnsafeServerRPCServer ¶
type UnsafeServerRPCServer interface {
// contains filtered or unexported methods
}
UnsafeServerRPCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServerRPCServer will result in compilation errors.