proto

package
v0.0.0-...-a16df9a Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BidirectionalStream_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "test.BidirectionalStream",
	HandlerType: (*BidirectionalStreamServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Echo",
			Handler:       _BidirectionalStream_Echo_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "EchoSum",
			Handler:       _BidirectionalStream_EchoSum_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/test.proto",
}

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

View Source
var ClientStream_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "test.ClientStream",
	HandlerType: (*ClientStreamServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Recv",
			Handler:       _ClientStream_Recv_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "RecvMetadata",
			Handler:       _ClientStream_RecvMetadata_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "proto/test.proto",
}

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

View Source
var Echo_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "test.Echo",
	HandlerType: (*EchoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Metadata",
			Handler:    _Echo_Metadata_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/test.proto",
}

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

View Source
var File_proto_test_proto protoreflect.FileDescriptor

Functions

func RegisterBidirectionalStreamServer

func RegisterBidirectionalStreamServer(s grpc.ServiceRegistrar, srv BidirectionalStreamServer)

func RegisterClientStreamServer

func RegisterClientStreamServer(s grpc.ServiceRegistrar, srv ClientStreamServer)

func RegisterEchoServer

func RegisterEchoServer(s grpc.ServiceRegistrar, srv EchoServer)

Types

type BidirectionalStreamClient

type BidirectionalStreamClient interface {
	Echo(ctx context.Context, opts ...grpc.CallOption) (BidirectionalStream_EchoClient, error)
	EchoSum(ctx context.Context, opts ...grpc.CallOption) (BidirectionalStream_EchoSumClient, error)
}

BidirectionalStreamClient is the client API for BidirectionalStream 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.

type BidirectionalStreamServer

type BidirectionalStreamServer interface {
	Echo(BidirectionalStream_EchoServer) error
	EchoSum(BidirectionalStream_EchoSumServer) error
	// contains filtered or unexported methods
}

BidirectionalStreamServer is the server API for BidirectionalStream service. All implementations must embed UnimplementedBidirectionalStreamServer for forward compatibility

type BidirectionalStream_EchoClient

type BidirectionalStream_EchoClient interface {
	Send(*RecvReq) error
	Recv() (*RecvResp, error)
	grpc.ClientStream
}

type BidirectionalStream_EchoServer

type BidirectionalStream_EchoServer interface {
	Send(*RecvResp) error
	Recv() (*RecvReq, error)
	grpc.ServerStream
}

type BidirectionalStream_EchoSumClient

type BidirectionalStream_EchoSumClient interface {
	Send(*RecvReq) error
	Recv() (*RecvResp, error)
	grpc.ClientStream
}

type BidirectionalStream_EchoSumServer

type BidirectionalStream_EchoSumServer interface {
	Send(*RecvResp) error
	Recv() (*RecvReq, error)
	grpc.ServerStream
}

type ClientStreamClient

type ClientStreamClient interface {
	Recv(ctx context.Context, opts ...grpc.CallOption) (ClientStream_RecvClient, error)
	RecvMetadata(ctx context.Context, opts ...grpc.CallOption) (ClientStream_RecvMetadataClient, error)
}

ClientStreamClient is the client API for ClientStream 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.

type ClientStreamServer

type ClientStreamServer interface {
	Recv(ClientStream_RecvServer) error
	RecvMetadata(ClientStream_RecvMetadataServer) error
	// contains filtered or unexported methods
}

ClientStreamServer is the server API for ClientStream service. All implementations must embed UnimplementedClientStreamServer for forward compatibility

type ClientStream_RecvClient

type ClientStream_RecvClient interface {
	Send(*RecvReq) error
	CloseAndRecv() (*RecvResp, error)
	grpc.ClientStream
}

type ClientStream_RecvMetadataClient

type ClientStream_RecvMetadataClient interface {
	Send(*RecvReq) error
	CloseAndRecv() (*RecvResp, error)
	grpc.ClientStream
}

type ClientStream_RecvMetadataServer

type ClientStream_RecvMetadataServer interface {
	SendAndClose(*RecvResp) error
	Recv() (*RecvReq, error)
	grpc.ServerStream
}

type ClientStream_RecvServer

type ClientStream_RecvServer interface {
	SendAndClose(*RecvResp) error
	Recv() (*RecvReq, error)
	grpc.ServerStream
}

type EchoClient

type EchoClient interface {
	Metadata(ctx context.Context, in *RecvReq, opts ...grpc.CallOption) (*RecvResp, error)
}

EchoClient is the client API for Echo 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 NewEchoClient

func NewEchoClient(cc grpc.ClientConnInterface) EchoClient

type EchoServer

type EchoServer interface {
	Metadata(context.Context, *RecvReq) (*RecvResp, error)
	// contains filtered or unexported methods
}

EchoServer is the server API for Echo service. All implementations must embed UnimplementedEchoServer for forward compatibility

type RecvReq

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

func (*RecvReq) Descriptor deprecated

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

Deprecated: Use RecvReq.ProtoReflect.Descriptor instead.

func (*RecvReq) GetData

func (x *RecvReq) GetData() string

func (*RecvReq) ProtoMessage

func (*RecvReq) ProtoMessage()

func (*RecvReq) ProtoReflect

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

func (*RecvReq) Reset

func (x *RecvReq) Reset()

func (*RecvReq) String

func (x *RecvReq) String() string

type RecvResp

type RecvResp struct {
	Count int32  `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	Data  string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*RecvResp) Descriptor deprecated

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

Deprecated: Use RecvResp.ProtoReflect.Descriptor instead.

func (*RecvResp) GetCount

func (x *RecvResp) GetCount() int32

func (*RecvResp) GetData

func (x *RecvResp) GetData() string

func (*RecvResp) ProtoMessage

func (*RecvResp) ProtoMessage()

func (*RecvResp) ProtoReflect

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

func (*RecvResp) Reset

func (x *RecvResp) Reset()

func (*RecvResp) String

func (x *RecvResp) String() string

type UnimplementedBidirectionalStreamServer

type UnimplementedBidirectionalStreamServer struct {
}

UnimplementedBidirectionalStreamServer must be embedded to have forward compatible implementations.

func (UnimplementedBidirectionalStreamServer) Echo

func (UnimplementedBidirectionalStreamServer) EchoSum

type UnimplementedClientStreamServer

type UnimplementedClientStreamServer struct {
}

UnimplementedClientStreamServer must be embedded to have forward compatible implementations.

func (UnimplementedClientStreamServer) Recv

func (UnimplementedClientStreamServer) RecvMetadata

type UnimplementedEchoServer

type UnimplementedEchoServer struct {
}

UnimplementedEchoServer must be embedded to have forward compatible implementations.

func (UnimplementedEchoServer) Metadata

type UnsafeBidirectionalStreamServer

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

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

type UnsafeClientStreamServer

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

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

type UnsafeEchoServer

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

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

Jump to

Keyboard shortcuts

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