proto

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Transfer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Io.Transfer",
	HandlerType: (*TransferServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Receive",
			Handler:       _Transfer_Receive_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Send",
			Handler:       _Transfer_Send_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "io.proto",
}

Transfer_ServiceDesc is the grpc.ServiceDesc for Transfer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTransferServer

func RegisterTransferServer(s grpc.ServiceRegistrar, srv TransferServer)

Types

type Chunk

type Chunk struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Chunk) Descriptor deprecated

func (*Chunk) Descriptor() ([]byte, []int)

Deprecated: Use Chunk.ProtoReflect.Descriptor instead.

func (*Chunk) GetData

func (x *Chunk) GetData() []byte

func (*Chunk) ProtoMessage

func (*Chunk) ProtoMessage()

func (*Chunk) ProtoReflect

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

func (*Chunk) Reset

func (x *Chunk) Reset()

func (*Chunk) String

func (x *Chunk) String() string

type Info

type Info struct {
	Msg *anypb.Any `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*Info) Descriptor deprecated

func (*Info) Descriptor() ([]byte, []int)

Deprecated: Use Info.ProtoReflect.Descriptor instead.

func (*Info) GetMsg

func (x *Info) GetMsg() *anypb.Any

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) ProtoReflect

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

func (*Info) Reset

func (x *Info) Reset()

func (*Info) String

func (x *Info) String() string

type Packet

type Packet struct {
	Info  *Info  `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	Chunk *Chunk `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// contains filtered or unexported fields
}

func (*Packet) Descriptor deprecated

func (*Packet) Descriptor() ([]byte, []int)

Deprecated: Use Packet.ProtoReflect.Descriptor instead.

func (*Packet) GetChunk

func (x *Packet) GetChunk() *Chunk

func (*Packet) GetInfo

func (x *Packet) GetInfo() *Info

func (*Packet) ProtoMessage

func (*Packet) ProtoMessage()

func (*Packet) ProtoReflect

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

func (*Packet) Reset

func (x *Packet) Reset()

func (*Packet) String

func (x *Packet) String() string

type TransferClient

type TransferClient interface {
	Receive(ctx context.Context, in *Info, opts ...grpc.CallOption) (Transfer_ReceiveClient, error)
	Send(ctx context.Context, opts ...grpc.CallOption) (Transfer_SendClient, error)
}

TransferClient is the client API for Transfer 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 NewTransferClient

func NewTransferClient(cc grpc.ClientConnInterface) TransferClient

type TransferServer

type TransferServer interface {
	Receive(*Info, Transfer_ReceiveServer) error
	Send(Transfer_SendServer) error
	// contains filtered or unexported methods
}

TransferServer is the server API for Transfer service. All implementations must embed UnimplementedTransferServer for forward compatibility

type Transfer_ReceiveClient

type Transfer_ReceiveClient interface {
	Recv() (*Packet, error)
	grpc.ClientStream
}

type Transfer_ReceiveServer

type Transfer_ReceiveServer interface {
	Send(*Packet) error
	grpc.ServerStream
}

type Transfer_SendClient

type Transfer_SendClient interface {
	Send(*Packet) error
	CloseAndRecv() (*emptypb.Empty, error)
	grpc.ClientStream
}

type Transfer_SendServer

type Transfer_SendServer interface {
	SendAndClose(*emptypb.Empty) error
	Recv() (*Packet, error)
	grpc.ServerStream
}

type UnimplementedTransferServer

type UnimplementedTransferServer struct {
}

UnimplementedTransferServer must be embedded to have forward compatible implementations.

func (UnimplementedTransferServer) Receive

func (UnimplementedTransferServer) Send

type UnsafeTransferServer

type UnsafeTransferServer interface {
	// contains filtered or unexported methods
}

UnsafeTransferServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TransferServer will result in compilation errors.

Jump to

Keyboard shortcuts

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