Documentation ¶
Index ¶
- Variables
- func RegisterRPCServer(s grpc.ServiceRegistrar, srv RPCServer)
- type Code
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetCode() Code
- func (x *Message) GetTData() *TData
- func (x *Message) GetVerify() *Verify
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type RPCClient
- type RPCServer
- type RPC_MessageStreamClient
- type RPC_MessageStreamServer
- type TData
- func (*TData) Descriptor() ([]byte, []int)deprecated
- func (x *TData) GetAddr() string
- func (x *TData) GetHash() string
- func (x *TData) GetNeedDownload() bool
- func (x *TData) GetTDataCode() TDataCode
- func (x *TData) GetTorrentData() []byte
- func (*TData) ProtoMessage()
- func (x *TData) ProtoReflect() protoreflect.Message
- func (x *TData) Reset()
- func (x *TData) String() string
- type TDataCode
- type UnimplementedRPCServer
- type UnsafeRPCServer
- type Verify
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Code_name = map[int32]string{ 0: "CodeUnDefine", 1: "CodeVerifyPassWord", 2: "CodeMessageTData", } Code_value = map[string]int32{ "CodeUnDefine": 0, "CodeVerifyPassWord": 1, "CodeMessageTData": 2, } )
Enum value maps for Code.
View Source
var ( TDataCode_name = map[int32]string{ 0: "TDataCodeUnDefine", 1: "TDataCodeVerifyHashExist", 2: "TDataCodeNeedDownload", 3: "TDataCodeNeedHandleTorrentData", } TDataCode_value = map[string]int32{ "TDataCodeUnDefine": 0, "TDataCodeVerifyHashExist": 1, "TDataCodeNeedDownload": 2, "TDataCodeNeedHandleTorrentData": 3, } )
Enum value maps for TDataCode.
View Source
var File_torrent_proto protoreflect.FileDescriptor
Functions ¶
func RegisterRPCServer ¶
func RegisterRPCServer(s grpc.ServiceRegistrar, srv RPCServer)
Types ¶
type Code ¶
type Code int32
func (Code) Descriptor ¶
func (Code) Descriptor() protoreflect.EnumDescriptor
func (Code) EnumDescriptor
deprecated
func (Code) Number ¶
func (x Code) Number() protoreflect.EnumNumber
func (Code) Type ¶
func (Code) Type() protoreflect.EnumType
type Message ¶
type Message struct { Code Code `protobuf:"varint,1,opt,name=code,proto3,enum=torrent.Code" json:"code,omitempty"` TData *TData `protobuf:"bytes,2,opt,name=TData,proto3" json:"TData,omitempty"` Verify *Verify `protobuf:"bytes,3,opt,name=Verify,proto3" json:"Verify,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type RPCClient ¶
type RPCClient interface {
MessageStream(ctx context.Context, opts ...grpc.CallOption) (RPC_MessageStreamClient, error)
}
RPCClient is the client API for RPC 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 NewRPCClient ¶
func NewRPCClient(cc grpc.ClientConnInterface) RPCClient
type RPCServer ¶
type RPCServer interface { MessageStream(RPC_MessageStreamServer) error // contains filtered or unexported methods }
RPCServer is the server API for RPC service. All implementations must embed UnimplementedRPCServer for forward compatibility
type RPC_MessageStreamClient ¶
type RPC_MessageStreamServer ¶
type TData ¶
type TData struct { TDataCode TDataCode `protobuf:"varint,1,opt,name=TDataCode,proto3,enum=torrent.TDataCode" json:"TDataCode,omitempty"` Hash string `protobuf:"bytes,2,opt,name=Hash,proto3" json:"Hash,omitempty"` Addr string `protobuf:"bytes,3,opt,name=Addr,proto3" json:"Addr,omitempty"` NeedDownload bool `protobuf:"varint,4,opt,name=NeedDownload,proto3" json:"NeedDownload,omitempty"` TorrentData []byte `protobuf:"bytes,5,opt,name=TorrentData,proto3" json:"TorrentData,omitempty"` // contains filtered or unexported fields }
func (*TData) Descriptor
deprecated
func (*TData) GetNeedDownload ¶
func (*TData) GetTDataCode ¶
func (*TData) GetTorrentData ¶
func (*TData) ProtoMessage ¶
func (*TData) ProtoMessage()
func (*TData) ProtoReflect ¶
func (x *TData) ProtoReflect() protoreflect.Message
type TDataCode ¶
type TDataCode int32
func (TDataCode) Descriptor ¶
func (TDataCode) Descriptor() protoreflect.EnumDescriptor
func (TDataCode) EnumDescriptor
deprecated
func (TDataCode) Number ¶
func (x TDataCode) Number() protoreflect.EnumNumber
func (TDataCode) Type ¶
func (TDataCode) Type() protoreflect.EnumType
type UnimplementedRPCServer ¶
type UnimplementedRPCServer struct { }
UnimplementedRPCServer must be embedded to have forward compatible implementations.
func (UnimplementedRPCServer) MessageStream ¶
func (UnimplementedRPCServer) MessageStream(RPC_MessageStreamServer) error
type UnsafeRPCServer ¶
type UnsafeRPCServer interface {
// contains filtered or unexported methods
}
UnsafeRPCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RPCServer will result in compilation errors.
type Verify ¶
type Verify struct { Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*Verify) Descriptor
deprecated
func (*Verify) GetPassword ¶
func (*Verify) ProtoMessage ¶
func (*Verify) ProtoMessage()
func (*Verify) ProtoReflect ¶
func (x *Verify) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.