Documentation ¶
Index ¶
- Variables
- func RegisterTorrentStoreServer(s *grpc.Server, srv TorrentStoreServer)
- type CheckReply
- type CheckRequest
- type PullReply
- type PullRequest
- type PushReply
- type PushRequest
- func (*PushRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PushRequest) GetExpire() int32deprecated
- func (x *PushRequest) GetTorrent() []byte
- func (*PushRequest) ProtoMessage()
- func (x *PushRequest) ProtoReflect() protoreflect.Message
- func (x *PushRequest) Reset()
- func (x *PushRequest) String() string
- type TorrentStoreClient
- type TorrentStoreServer
- type TouchReply
- type TouchRequest
- func (*TouchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TouchRequest) GetExpire() int32deprecated
- func (x *TouchRequest) GetInfoHash() string
- func (*TouchRequest) ProtoMessage()
- func (x *TouchRequest) ProtoReflect() protoreflect.Message
- func (x *TouchRequest) Reset()
- func (x *TouchRequest) String() string
- type UnimplementedTorrentStoreServer
Constants ¶
This section is empty.
Variables ¶
var File_torrent_store_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTorrentStoreServer ¶
func RegisterTorrentStoreServer(s *grpc.Server, srv TorrentStoreServer)
Types ¶
type CheckReply ¶
type CheckReply struct { Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` // contains filtered or unexported fields }
The check response message containing existance flag
func (*CheckReply) Descriptor
deprecated
func (*CheckReply) Descriptor() ([]byte, []int)
Deprecated: Use CheckReply.ProtoReflect.Descriptor instead.
func (*CheckReply) GetExists ¶
func (x *CheckReply) GetExists() bool
func (*CheckReply) ProtoMessage ¶
func (*CheckReply) ProtoMessage()
func (*CheckReply) ProtoReflect ¶
func (x *CheckReply) ProtoReflect() protoreflect.Message
func (*CheckReply) Reset ¶
func (x *CheckReply) Reset()
func (*CheckReply) String ¶
func (x *CheckReply) String() string
type CheckRequest ¶
type CheckRequest struct { InfoHash string `protobuf:"bytes,1,opt,name=infoHash,proto3" json:"infoHash,omitempty"` // contains filtered or unexported fields }
The check request message containing the infoHash
func (*CheckRequest) Descriptor
deprecated
func (*CheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.
func (*CheckRequest) GetInfoHash ¶
func (x *CheckRequest) GetInfoHash() string
func (*CheckRequest) ProtoMessage ¶
func (*CheckRequest) ProtoMessage()
func (*CheckRequest) ProtoReflect ¶
func (x *CheckRequest) ProtoReflect() protoreflect.Message
func (*CheckRequest) Reset ¶
func (x *CheckRequest) Reset()
func (*CheckRequest) String ¶
func (x *CheckRequest) String() string
type PullReply ¶
type PullReply struct { Torrent []byte `protobuf:"bytes,1,opt,name=torrent,proto3" json:"torrent,omitempty"` // contains filtered or unexported fields }
The pull response message containing the torrent
func (*PullReply) Descriptor
deprecated
func (*PullReply) GetTorrent ¶
func (*PullReply) ProtoMessage ¶
func (*PullReply) ProtoMessage()
func (*PullReply) ProtoReflect ¶
func (x *PullReply) ProtoReflect() protoreflect.Message
type PullRequest ¶
type PullRequest struct { InfoHash string `protobuf:"bytes,1,opt,name=infoHash,proto3" json:"infoHash,omitempty"` // contains filtered or unexported fields }
The pull request message containing the infoHash
func (*PullRequest) Descriptor
deprecated
func (*PullRequest) Descriptor() ([]byte, []int)
Deprecated: Use PullRequest.ProtoReflect.Descriptor instead.
func (*PullRequest) GetInfoHash ¶
func (x *PullRequest) GetInfoHash() string
func (*PullRequest) ProtoMessage ¶
func (*PullRequest) ProtoMessage()
func (*PullRequest) ProtoReflect ¶
func (x *PullRequest) ProtoReflect() protoreflect.Message
func (*PullRequest) Reset ¶
func (x *PullRequest) Reset()
func (*PullRequest) String ¶
func (x *PullRequest) String() string
type PushReply ¶
type PushReply struct { InfoHash string `protobuf:"bytes,1,opt,name=infoHash,proto3" json:"infoHash,omitempty"` // contains filtered or unexported fields }
The push response message containing info hash of the pushed torrent file
func (*PushReply) Descriptor
deprecated
func (*PushReply) GetInfoHash ¶
func (*PushReply) ProtoMessage ¶
func (*PushReply) ProtoMessage()
func (*PushReply) ProtoReflect ¶
func (x *PushReply) ProtoReflect() protoreflect.Message
type PushRequest ¶
type PushRequest struct { Torrent []byte `protobuf:"bytes,1,opt,name=torrent,proto3" json:"torrent,omitempty"` // Deprecated: Do not use. Expire int32 `protobuf:"varint,2,opt,name=expire,proto3" json:"expire,omitempty"` // contains filtered or unexported fields }
The push request message containing the torrent and expire duration is seconds
func (*PushRequest) Descriptor
deprecated
func (*PushRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushRequest.ProtoReflect.Descriptor instead.
func (*PushRequest) GetExpire
deprecated
func (x *PushRequest) GetExpire() int32
Deprecated: Do not use.
func (*PushRequest) GetTorrent ¶
func (x *PushRequest) GetTorrent() []byte
func (*PushRequest) ProtoMessage ¶
func (*PushRequest) ProtoMessage()
func (*PushRequest) ProtoReflect ¶
func (x *PushRequest) ProtoReflect() protoreflect.Message
func (*PushRequest) Reset ¶
func (x *PushRequest) Reset()
func (*PushRequest) String ¶
func (x *PushRequest) String() string
type TorrentStoreClient ¶
type TorrentStoreClient interface { // Pushes torrent to the store Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushReply, error) // Pulls torrent from the store Pull(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*PullReply, error) // Touch torrent in the store Touch(ctx context.Context, in *TouchRequest, opts ...grpc.CallOption) (*TouchReply, error) }
TorrentStoreClient is the client API for TorrentStore service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTorrentStoreClient ¶
func NewTorrentStoreClient(cc grpc.ClientConnInterface) TorrentStoreClient
type TorrentStoreServer ¶
type TorrentStoreServer interface { // Pushes torrent to the store Push(context.Context, *PushRequest) (*PushReply, error) // Pulls torrent from the store Pull(context.Context, *PullRequest) (*PullReply, error) // Touch torrent in the store Touch(context.Context, *TouchRequest) (*TouchReply, error) }
TorrentStoreServer is the server API for TorrentStore service.
type TouchReply ¶
type TouchReply struct {
// contains filtered or unexported fields
}
The touch response message
func (*TouchReply) Descriptor
deprecated
func (*TouchReply) Descriptor() ([]byte, []int)
Deprecated: Use TouchReply.ProtoReflect.Descriptor instead.
func (*TouchReply) ProtoMessage ¶
func (*TouchReply) ProtoMessage()
func (*TouchReply) ProtoReflect ¶
func (x *TouchReply) ProtoReflect() protoreflect.Message
func (*TouchReply) Reset ¶
func (x *TouchReply) Reset()
func (*TouchReply) String ¶
func (x *TouchReply) String() string
type TouchRequest ¶
type TouchRequest struct { InfoHash string `protobuf:"bytes,1,opt,name=infoHash,proto3" json:"infoHash,omitempty"` // Deprecated: Do not use. Expire int32 `protobuf:"varint,2,opt,name=expire,proto3" json:"expire,omitempty"` // contains filtered or unexported fields }
The touch request message containing the torrent and expire duration is seconds
func (*TouchRequest) Descriptor
deprecated
func (*TouchRequest) Descriptor() ([]byte, []int)
Deprecated: Use TouchRequest.ProtoReflect.Descriptor instead.
func (*TouchRequest) GetExpire
deprecated
func (x *TouchRequest) GetExpire() int32
Deprecated: Do not use.
func (*TouchRequest) GetInfoHash ¶
func (x *TouchRequest) GetInfoHash() string
func (*TouchRequest) ProtoMessage ¶
func (*TouchRequest) ProtoMessage()
func (*TouchRequest) ProtoReflect ¶
func (x *TouchRequest) ProtoReflect() protoreflect.Message
func (*TouchRequest) Reset ¶
func (x *TouchRequest) Reset()
func (*TouchRequest) String ¶
func (x *TouchRequest) String() string
type UnimplementedTorrentStoreServer ¶
type UnimplementedTorrentStoreServer struct { }
UnimplementedTorrentStoreServer can be embedded to have forward compatible implementations.
func (*UnimplementedTorrentStoreServer) Pull ¶
func (*UnimplementedTorrentStoreServer) Pull(context.Context, *PullRequest) (*PullReply, error)
func (*UnimplementedTorrentStoreServer) Push ¶
func (*UnimplementedTorrentStoreServer) Push(context.Context, *PushRequest) (*PushReply, error)
func (*UnimplementedTorrentStoreServer) Touch ¶
func (*UnimplementedTorrentStoreServer) Touch(context.Context, *TouchRequest) (*TouchReply, error)