Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
- type ExampleRequest
- type ExampleResponse
- type ExampleServiceClient
- type ExampleServiceServer
- type ExampleService_StreamExampleClient
- type ExampleService_StreamExampleServer
- type UnimplementedExampleServiceServer
- type UnsafeExampleServiceServer
Constants ¶
const ( ExampleService_UnaryExample_FullMethodName = "/main.ExampleService/UnaryExample" ExampleService_StreamExample_FullMethodName = "/main.ExampleService/StreamExample" )
Variables ¶
var ExampleService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "main.ExampleService", HandlerType: (*ExampleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UnaryExample", Handler: _ExampleService_UnaryExample_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamExample", Handler: _ExampleService_StreamExample_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "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_example_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExampleServiceServer ¶
func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
Types ¶
type ExampleRequest ¶
type ExampleRequest struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
ExampleRequest is the request message.
func (*ExampleRequest) Descriptor
deprecated
func (*ExampleRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExampleRequest.ProtoReflect.Descriptor instead.
func (*ExampleRequest) GetMessage ¶
func (x *ExampleRequest) GetMessage() 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 {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
ExampleResponse is the response message.
func (*ExampleResponse) Descriptor
deprecated
func (*ExampleResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExampleResponse.ProtoReflect.Descriptor instead.
func (*ExampleResponse) GetMessage ¶
func (x *ExampleResponse) GetMessage() 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 {
UnaryExample(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleResponse, error)
StreamExample(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ExampleRequest, ExampleResponse], 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.
ExampleService defines the gRPC service.
func NewExampleServiceClient ¶
func NewExampleServiceClient(cc grpc.ClientConnInterface) ExampleServiceClient
type ExampleServiceServer ¶
type ExampleServiceServer interface {
UnaryExample(context.Context, *ExampleRequest) (*ExampleResponse, error)
StreamExample(grpc.BidiStreamingServer[ExampleRequest, ExampleResponse]) error
// contains filtered or unexported methods
}
ExampleServiceServer is the server API for ExampleService service. All implementations must embed UnimplementedExampleServiceServer for forward compatibility.
ExampleService defines the gRPC service.
type ExampleService_StreamExampleClient ¶
type ExampleService_StreamExampleClient = grpc.BidiStreamingClient[ExampleRequest, ExampleResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ExampleService_StreamExampleServer ¶
type ExampleService_StreamExampleServer = grpc.BidiStreamingServer[ExampleRequest, ExampleResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedExampleServiceServer ¶
type UnimplementedExampleServiceServer struct{}
UnimplementedExampleServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedExampleServiceServer) StreamExample ¶
func (UnimplementedExampleServiceServer) StreamExample(grpc.BidiStreamingServer[ExampleRequest, ExampleResponse]) error
func (UnimplementedExampleServiceServer) UnaryExample ¶
func (UnimplementedExampleServiceServer) UnaryExample(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.