Documentation
¶
Index ¶
- Variables
- func RegisterBidirectionalStreamServer(s grpc.ServiceRegistrar, srv BidirectionalStreamServer)
- func RegisterClientStreamServer(s grpc.ServiceRegistrar, srv ClientStreamServer)
- func RegisterEchoServer(s grpc.ServiceRegistrar, srv EchoServer)
- type BidirectionalStreamClient
- type BidirectionalStreamServer
- type BidirectionalStream_EchoClient
- type BidirectionalStream_EchoServer
- type BidirectionalStream_EchoSumClient
- type BidirectionalStream_EchoSumServer
- type ClientStreamClient
- type ClientStreamServer
- type ClientStream_RecvClient
- type ClientStream_RecvMetadataClient
- type ClientStream_RecvMetadataServer
- type ClientStream_RecvServer
- type EchoClient
- type EchoServer
- type RecvReq
- type RecvResp
- type UnimplementedBidirectionalStreamServer
- type UnimplementedClientStreamServer
- type UnimplementedEchoServer
- type UnsafeBidirectionalStreamServer
- type UnsafeClientStreamServer
- type UnsafeEchoServer
Constants ¶
This section is empty.
Variables ¶
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)
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)
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)
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.
func NewBidirectionalStreamClient ¶
func NewBidirectionalStreamClient(cc grpc.ClientConnInterface) BidirectionalStreamClient
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 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.
func NewClientStreamClient ¶
func NewClientStreamClient(cc grpc.ClientConnInterface) ClientStreamClient
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_RecvServer ¶
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) ProtoMessage ¶
func (*RecvReq) ProtoMessage()
func (*RecvReq) ProtoReflect ¶
func (x *RecvReq) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*RecvResp) ProtoMessage()
func (*RecvResp) ProtoReflect ¶
func (x *RecvResp) ProtoReflect() protoreflect.Message
type UnimplementedBidirectionalStreamServer ¶
type UnimplementedBidirectionalStreamServer struct { }
UnimplementedBidirectionalStreamServer must be embedded to have forward compatible implementations.
type UnimplementedClientStreamServer ¶
type UnimplementedClientStreamServer struct { }
UnimplementedClientStreamServer must be embedded to have forward compatible implementations.
func (UnimplementedClientStreamServer) Recv ¶
func (UnimplementedClientStreamServer) Recv(ClientStream_RecvServer) error
func (UnimplementedClientStreamServer) RecvMetadata ¶
func (UnimplementedClientStreamServer) RecvMetadata(ClientStream_RecvMetadataServer) error
type UnimplementedEchoServer ¶
type UnimplementedEchoServer struct { }
UnimplementedEchoServer must be embedded to have forward compatible implementations.
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.