Documentation ¶
Index ¶
- Variables
- func RegisterBitTorrentServer(s *grpc.Server, srv BitTorrentServer)
- type BitTorrent
- func (*BitTorrent) Descriptor() ([]byte, []int)deprecated
- func (x *BitTorrent) GetFiles() []*File
- func (x *BitTorrent) GetInfohash() string
- func (x *BitTorrent) GetLength() int32
- func (x *BitTorrent) GetName() string
- func (*BitTorrent) ProtoMessage()
- func (x *BitTorrent) ProtoReflect() protoreflect.Message
- func (x *BitTorrent) Reset()
- func (x *BitTorrent) String() string
- type BitTorrentClient
- type BitTorrentServer
- type Empty
- type File
- type UnimplementedBitTorrentServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_bittorrent_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBitTorrentServer ¶
func RegisterBitTorrentServer(s *grpc.Server, srv BitTorrentServer)
Types ¶
type BitTorrent ¶
type BitTorrent struct { Infohash string `protobuf:"bytes,1,opt,name=infohash,proto3" json:"infohash,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Files []*File `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"` Length int32 `protobuf:"varint,4,opt,name=length,proto3" json:"length,omitempty"` // contains filtered or unexported fields }
func (*BitTorrent) Descriptor
deprecated
func (*BitTorrent) Descriptor() ([]byte, []int)
Deprecated: Use BitTorrent.ProtoReflect.Descriptor instead.
func (*BitTorrent) GetFiles ¶
func (x *BitTorrent) GetFiles() []*File
func (*BitTorrent) GetInfohash ¶
func (x *BitTorrent) GetInfohash() string
func (*BitTorrent) GetLength ¶
func (x *BitTorrent) GetLength() int32
func (*BitTorrent) GetName ¶
func (x *BitTorrent) GetName() string
func (*BitTorrent) ProtoMessage ¶
func (*BitTorrent) ProtoMessage()
func (*BitTorrent) ProtoReflect ¶
func (x *BitTorrent) ProtoReflect() protoreflect.Message
func (*BitTorrent) Reset ¶
func (x *BitTorrent) Reset()
func (*BitTorrent) String ¶
func (x *BitTorrent) String() string
type BitTorrentClient ¶
type BitTorrentClient interface {
Send(ctx context.Context, in *BitTorrent, opts ...grpc.CallOption) (*Empty, error)
}
BitTorrentClient is the client API for BitTorrent 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 NewBitTorrentClient ¶
func NewBitTorrentClient(cc grpc.ClientConnInterface) BitTorrentClient
type BitTorrentServer ¶
type BitTorrentServer interface { Send(context.Context, *BitTorrent) (*Empty, error) // contains filtered or unexported methods }
BitTorrentServer is the server API for BitTorrent service. All implementations must embed UnimplementedBitTorrentServer for forward compatibility
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type File ¶
type File struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Length int32 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` // contains filtered or unexported fields }
func (*File) Descriptor
deprecated
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type UnimplementedBitTorrentServer ¶
type UnimplementedBitTorrentServer struct { }
UnimplementedBitTorrentServer must be embedded to have forward compatible implementations.
func (*UnimplementedBitTorrentServer) Send ¶
func (*UnimplementedBitTorrentServer) Send(context.Context, *BitTorrent) (*Empty, error)
Click to show internal directories.
Click to hide internal directories.