Documentation ¶
Index ¶
- Variables
- func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
- type ExampleRequest
- type ExampleResponse
- type ExampleServiceClient
- type ExampleServiceServer
- type ExampleService_ExampleStreamingClient
- type ExampleService_ExampleStreamingServer
- type UnimplementedExampleServiceServer
- type UnsafeExampleServiceServer
Constants ¶
This section is empty.
Variables ¶
var ExampleService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.ExampleService", HandlerType: (*ExampleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ExampleUnary", Handler: _ExampleService_ExampleUnary_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ExampleStreaming", Handler: _ExampleService_ExampleStreaming_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/example.proto", }
ExampleService_ServiceDesc is the grpc.ServiceDesc for ExampleService 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_example_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExampleServiceServer ¶
func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
Types ¶
type ExampleRequest ¶
type ExampleRequest struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
func (*ExampleRequest) Descriptor
deprecated
func (*ExampleRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExampleRequest.ProtoReflect.Descriptor instead.
func (*ExampleRequest) GetText ¶
func (x *ExampleRequest) GetText() string
func (*ExampleRequest) ProtoMessage ¶
func (*ExampleRequest) ProtoMessage()
func (*ExampleRequest) ProtoReflect ¶
func (x *ExampleRequest) ProtoReflect() protoreflect.Message
func (*ExampleRequest) Reset ¶
func (x *ExampleRequest) Reset()
func (*ExampleRequest) String ¶
func (x *ExampleRequest) String() string
type ExampleResponse ¶
type ExampleResponse struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
func (*ExampleResponse) Descriptor
deprecated
func (*ExampleResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExampleResponse.ProtoReflect.Descriptor instead.
func (*ExampleResponse) GetText ¶
func (x *ExampleResponse) GetText() string
func (*ExampleResponse) ProtoMessage ¶
func (*ExampleResponse) ProtoMessage()
func (*ExampleResponse) ProtoReflect ¶
func (x *ExampleResponse) ProtoReflect() protoreflect.Message
func (*ExampleResponse) Reset ¶
func (x *ExampleResponse) Reset()
func (*ExampleResponse) String ¶
func (x *ExampleResponse) String() string
type ExampleServiceClient ¶
type ExampleServiceClient interface { // Example unary rpc ExampleUnary(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleResponse, error) // Example bidi streaming rpc ExampleStreaming(ctx context.Context, opts ...grpc.CallOption) (ExampleService_ExampleStreamingClient, error) }
ExampleServiceClient is the client API for ExampleService 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 NewExampleServiceClient ¶
func NewExampleServiceClient(cc grpc.ClientConnInterface) ExampleServiceClient
type ExampleServiceServer ¶
type ExampleServiceServer interface { // Example unary rpc ExampleUnary(context.Context, *ExampleRequest) (*ExampleResponse, error) // Example bidi streaming rpc ExampleStreaming(ExampleService_ExampleStreamingServer) error // contains filtered or unexported methods }
ExampleServiceServer is the server API for ExampleService service. All implementations must embed UnimplementedExampleServiceServer for forward compatibility
type ExampleService_ExampleStreamingClient ¶
type ExampleService_ExampleStreamingClient interface { Send(*ExampleRequest) error Recv() (*ExampleResponse, error) grpc.ClientStream }
type ExampleService_ExampleStreamingServer ¶
type ExampleService_ExampleStreamingServer interface { Send(*ExampleResponse) error Recv() (*ExampleRequest, error) grpc.ServerStream }
type UnimplementedExampleServiceServer ¶
type UnimplementedExampleServiceServer struct { }
UnimplementedExampleServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedExampleServiceServer) ExampleStreaming ¶
func (UnimplementedExampleServiceServer) ExampleStreaming(ExampleService_ExampleStreamingServer) error
func (UnimplementedExampleServiceServer) ExampleUnary ¶
func (UnimplementedExampleServiceServer) ExampleUnary(context.Context, *ExampleRequest) (*ExampleResponse, error)
type UnsafeExampleServiceServer ¶
type UnsafeExampleServiceServer interface {
// contains filtered or unexported methods
}
UnsafeExampleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleServiceServer will result in compilation errors.