service

package
v0.0.0-...-702ed95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetLength

func (x *File) GetLength() int32

func (*File) GetPath

func (x *File) GetPath() string

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

func (x *File) ProtoReflect() protoreflect.Message

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

type UnimplementedBitTorrentServer

type UnimplementedBitTorrentServer struct {
}

UnimplementedBitTorrentServer must be embedded to have forward compatible implementations.

func (*UnimplementedBitTorrentServer) Send

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL