Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGreetServiceServer(s grpc.ServiceRegistrar, srv GreetServiceServer)
- type GreetServiceClient
- type GreetServiceServer
- type GreetService_SayHelloBidirectionalStreamingClient
- type GreetService_SayHelloBidirectionalStreamingServer
- type GreetService_SayHelloClientStreamingClient
- type GreetService_SayHelloClientStreamingServer
- type GreetService_SayHelloServerStreamingClient
- type GreetService_SayHelloServerStreamingServer
- type HelloRequest
- type HelloResponse
- type MessagesList
- type NameList
- type NoParam
- type UnimplementedGreetServiceServer
- func (UnimplementedGreetServiceServer) SayHello(context.Context, *NoParam) (*HelloResponse, error)
- func (UnimplementedGreetServiceServer) SayHelloBidirectionalStreaming(grpc.ClientStreamingServer[HelloRequest, HelloResponse]) error
- func (UnimplementedGreetServiceServer) SayHelloClientStreaming(grpc.ClientStreamingServer[HelloRequest, MessagesList]) error
- func (UnimplementedGreetServiceServer) SayHelloServerStreaming(*NameList, grpc.ServerStreamingServer[HelloResponse]) error
- type UnsafeGreetServiceServer
Constants ¶
const ( GreetService_SayHello_FullMethodName = "/greet_service.GreetService/SayHello" GreetService_SayHelloServerStreaming_FullMethodName = "/greet_service.GreetService/SayHelloServerStreaming" GreetService_SayHelloClientStreaming_FullMethodName = "/greet_service.GreetService/SayHelloClientStreaming" GreetService_SayHelloBidirectionalStreaming_FullMethodName = "/greet_service.GreetService/SayHelloBidirectionalStreaming" )
Variables ¶
var File_proto_greet_proto protoreflect.FileDescriptor
var GreetService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "greet_service.GreetService", HandlerType: (*GreetServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _GreetService_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SayHelloServerStreaming", Handler: _GreetService_SayHelloServerStreaming_Handler, ServerStreams: true, }, { StreamName: "SayHelloClientStreaming", Handler: _GreetService_SayHelloClientStreaming_Handler, ClientStreams: true, }, { StreamName: "SayHelloBidirectionalStreaming", Handler: _GreetService_SayHelloBidirectionalStreaming_Handler, ClientStreams: true, }, }, Metadata: "proto/greet.proto", }
GreetService_ServiceDesc is the grpc.ServiceDesc for GreetService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreetServiceServer ¶
func RegisterGreetServiceServer(s grpc.ServiceRegistrar, srv GreetServiceServer)
Types ¶
type GreetServiceClient ¶
type GreetServiceClient interface { SayHello(ctx context.Context, in *NoParam, opts ...grpc.CallOption) (*HelloResponse, error) SayHelloServerStreaming(ctx context.Context, in *NameList, opts ...grpc.CallOption) (grpc.ServerStreamingClient[HelloResponse], error) SayHelloClientStreaming(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[HelloRequest, MessagesList], error) SayHelloBidirectionalStreaming(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[HelloRequest, HelloResponse], error) }
GreetServiceClient is the client API for GreetService 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 NewGreetServiceClient ¶
func NewGreetServiceClient(cc grpc.ClientConnInterface) GreetServiceClient
type GreetServiceServer ¶
type GreetServiceServer interface { SayHello(context.Context, *NoParam) (*HelloResponse, error) SayHelloServerStreaming(*NameList, grpc.ServerStreamingServer[HelloResponse]) error SayHelloClientStreaming(grpc.ClientStreamingServer[HelloRequest, MessagesList]) error SayHelloBidirectionalStreaming(grpc.ClientStreamingServer[HelloRequest, HelloResponse]) error // contains filtered or unexported methods }
GreetServiceServer is the server API for GreetService service. All implementations must embed UnimplementedGreetServiceServer for forward compatibility.
type GreetService_SayHelloBidirectionalStreamingClient ¶
type GreetService_SayHelloBidirectionalStreamingClient = grpc.ClientStreamingClient[HelloRequest, HelloResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GreetService_SayHelloBidirectionalStreamingServer ¶
type GreetService_SayHelloBidirectionalStreamingServer = grpc.ClientStreamingServer[HelloRequest, HelloResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GreetService_SayHelloClientStreamingClient ¶
type GreetService_SayHelloClientStreamingClient = grpc.ClientStreamingClient[HelloRequest, MessagesList]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GreetService_SayHelloClientStreamingServer ¶
type GreetService_SayHelloClientStreamingServer = grpc.ClientStreamingServer[HelloRequest, MessagesList]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GreetService_SayHelloServerStreamingClient ¶
type GreetService_SayHelloServerStreamingClient = grpc.ServerStreamingClient[HelloResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GreetService_SayHelloServerStreamingServer ¶
type GreetService_SayHelloServerStreamingServer = grpc.ServerStreamingServer[HelloResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type HelloRequest ¶
type HelloRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetMessage ¶
func (x *HelloRequest) GetMessage() string
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type HelloResponse ¶
type HelloResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloResponse) Descriptor
deprecated
func (*HelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.
func (*HelloResponse) GetMessage ¶
func (x *HelloResponse) GetMessage() string
func (*HelloResponse) ProtoMessage ¶
func (*HelloResponse) ProtoMessage()
func (*HelloResponse) ProtoReflect ¶
func (x *HelloResponse) ProtoReflect() protoreflect.Message
func (*HelloResponse) Reset ¶
func (x *HelloResponse) Reset()
func (*HelloResponse) String ¶
func (x *HelloResponse) String() string
type MessagesList ¶
type MessagesList struct { Messages []string `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` // contains filtered or unexported fields }
func (*MessagesList) Descriptor
deprecated
func (*MessagesList) Descriptor() ([]byte, []int)
Deprecated: Use MessagesList.ProtoReflect.Descriptor instead.
func (*MessagesList) GetMessages ¶
func (x *MessagesList) GetMessages() []string
func (*MessagesList) ProtoMessage ¶
func (*MessagesList) ProtoMessage()
func (*MessagesList) ProtoReflect ¶
func (x *MessagesList) ProtoReflect() protoreflect.Message
func (*MessagesList) Reset ¶
func (x *MessagesList) Reset()
func (*MessagesList) String ¶
func (x *MessagesList) String() string
type NameList ¶
type NameList struct { Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` // contains filtered or unexported fields }
func (*NameList) Descriptor
deprecated
func (*NameList) ProtoMessage ¶
func (*NameList) ProtoMessage()
func (*NameList) ProtoReflect ¶
func (x *NameList) ProtoReflect() protoreflect.Message
type NoParam ¶
type NoParam struct {
// contains filtered or unexported fields
}
func (*NoParam) Descriptor
deprecated
func (*NoParam) ProtoMessage ¶
func (*NoParam) ProtoMessage()
func (*NoParam) ProtoReflect ¶
func (x *NoParam) ProtoReflect() protoreflect.Message
type UnimplementedGreetServiceServer ¶
type UnimplementedGreetServiceServer struct{}
UnimplementedGreetServiceServer 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 (UnimplementedGreetServiceServer) SayHello ¶
func (UnimplementedGreetServiceServer) SayHello(context.Context, *NoParam) (*HelloResponse, error)
func (UnimplementedGreetServiceServer) SayHelloBidirectionalStreaming ¶
func (UnimplementedGreetServiceServer) SayHelloBidirectionalStreaming(grpc.ClientStreamingServer[HelloRequest, HelloResponse]) error
func (UnimplementedGreetServiceServer) SayHelloClientStreaming ¶
func (UnimplementedGreetServiceServer) SayHelloClientStreaming(grpc.ClientStreamingServer[HelloRequest, MessagesList]) error
func (UnimplementedGreetServiceServer) SayHelloServerStreaming ¶
func (UnimplementedGreetServiceServer) SayHelloServerStreaming(*NameList, grpc.ServerStreamingServer[HelloResponse]) error
type UnsafeGreetServiceServer ¶
type UnsafeGreetServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGreetServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreetServiceServer will result in compilation errors.