Documentation ¶
Index ¶
- Variables
- func RegisterGreeterServiceServer(s grpc.ServiceRegistrar, srv GreeterServiceServer)
- type GreeterServiceClient
- type GreeterServiceServer
- type GreeterService_ServerGreetsClient
- type GreeterService_ServerGreetsServer
- type SayHelloRequest
- type SayHelloResponse
- type ServerGreetsRequest
- func (*ServerGreetsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ServerGreetsRequest) GetName() string
- func (*ServerGreetsRequest) ProtoMessage()
- func (x *ServerGreetsRequest) ProtoReflect() protoreflect.Message
- func (x *ServerGreetsRequest) Reset()
- func (x *ServerGreetsRequest) String() string
- type ServerGreetsResponse
- func (*ServerGreetsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ServerGreetsResponse) GetMessage() string
- func (*ServerGreetsResponse) ProtoMessage()
- func (x *ServerGreetsResponse) ProtoReflect() protoreflect.Message
- func (x *ServerGreetsResponse) Reset()
- func (x *ServerGreetsResponse) String() string
- type UnimplementedGreeterServiceServer
- type UnsafeGreeterServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_internal_hello_v1_hello_proto protoreflect.FileDescriptor
var GreeterService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "internal.hello.v1.GreeterService", HandlerType: (*GreeterServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _GreeterService_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ServerGreets", Handler: _GreeterService_ServerGreets_Handler, ServerStreams: true, }, }, Metadata: "internal/hello/v1/hello.proto", }
GreeterService_ServiceDesc is the grpc.ServiceDesc for GreeterService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreeterServiceServer ¶
func RegisterGreeterServiceServer(s grpc.ServiceRegistrar, srv GreeterServiceServer)
Types ¶
type GreeterServiceClient ¶
type GreeterServiceClient interface { // Sends a greeting SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) // Response greetings ServerGreets(ctx context.Context, in *ServerGreetsRequest, opts ...grpc.CallOption) (GreeterService_ServerGreetsClient, error) }
GreeterServiceClient is the client API for GreeterService 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 NewGreeterServiceClient ¶
func NewGreeterServiceClient(cc grpc.ClientConnInterface) GreeterServiceClient
type GreeterServiceServer ¶
type GreeterServiceServer interface { // Sends a greeting SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) // Response greetings ServerGreets(*ServerGreetsRequest, GreeterService_ServerGreetsServer) error // contains filtered or unexported methods }
GreeterServiceServer is the server API for GreeterService service. All implementations must embed UnimplementedGreeterServiceServer for forward compatibility
type GreeterService_ServerGreetsClient ¶
type GreeterService_ServerGreetsClient interface { Recv() (*ServerGreetsResponse, error) grpc.ClientStream }
type GreeterService_ServerGreetsServer ¶
type GreeterService_ServerGreetsServer interface { Send(*ServerGreetsResponse) error grpc.ServerStream }
type SayHelloRequest ¶
type SayHelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*SayHelloRequest) Descriptor
deprecated
func (*SayHelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use SayHelloRequest.ProtoReflect.Descriptor instead.
func (*SayHelloRequest) GetName ¶
func (x *SayHelloRequest) GetName() string
func (*SayHelloRequest) ProtoMessage ¶
func (*SayHelloRequest) ProtoMessage()
func (*SayHelloRequest) ProtoReflect ¶
func (x *SayHelloRequest) ProtoReflect() protoreflect.Message
func (*SayHelloRequest) Reset ¶
func (x *SayHelloRequest) Reset()
func (*SayHelloRequest) String ¶
func (x *SayHelloRequest) String() string
type SayHelloResponse ¶
type SayHelloResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*SayHelloResponse) Descriptor
deprecated
func (*SayHelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use SayHelloResponse.ProtoReflect.Descriptor instead.
func (*SayHelloResponse) GetMessage ¶
func (x *SayHelloResponse) GetMessage() string
func (*SayHelloResponse) ProtoMessage ¶
func (*SayHelloResponse) ProtoMessage()
func (*SayHelloResponse) ProtoReflect ¶
func (x *SayHelloResponse) ProtoReflect() protoreflect.Message
func (*SayHelloResponse) Reset ¶
func (x *SayHelloResponse) Reset()
func (*SayHelloResponse) String ¶
func (x *SayHelloResponse) String() string
type ServerGreetsRequest ¶
type ServerGreetsRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*ServerGreetsRequest) Descriptor
deprecated
func (*ServerGreetsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ServerGreetsRequest.ProtoReflect.Descriptor instead.
func (*ServerGreetsRequest) GetName ¶
func (x *ServerGreetsRequest) GetName() string
func (*ServerGreetsRequest) ProtoMessage ¶
func (*ServerGreetsRequest) ProtoMessage()
func (*ServerGreetsRequest) ProtoReflect ¶
func (x *ServerGreetsRequest) ProtoReflect() protoreflect.Message
func (*ServerGreetsRequest) Reset ¶
func (x *ServerGreetsRequest) Reset()
func (*ServerGreetsRequest) String ¶
func (x *ServerGreetsRequest) String() string
type ServerGreetsResponse ¶
type ServerGreetsResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ServerGreetsResponse) Descriptor
deprecated
func (*ServerGreetsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ServerGreetsResponse.ProtoReflect.Descriptor instead.
func (*ServerGreetsResponse) GetMessage ¶
func (x *ServerGreetsResponse) GetMessage() string
func (*ServerGreetsResponse) ProtoMessage ¶
func (*ServerGreetsResponse) ProtoMessage()
func (*ServerGreetsResponse) ProtoReflect ¶
func (x *ServerGreetsResponse) ProtoReflect() protoreflect.Message
func (*ServerGreetsResponse) Reset ¶
func (x *ServerGreetsResponse) Reset()
func (*ServerGreetsResponse) String ¶
func (x *ServerGreetsResponse) String() string
type UnimplementedGreeterServiceServer ¶
type UnimplementedGreeterServiceServer struct { }
UnimplementedGreeterServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGreeterServiceServer) SayHello ¶
func (UnimplementedGreeterServiceServer) SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error)
func (UnimplementedGreeterServiceServer) ServerGreets ¶
func (UnimplementedGreeterServiceServer) ServerGreets(*ServerGreetsRequest, GreeterService_ServerGreetsServer) error
type UnsafeGreeterServiceServer ¶
type UnsafeGreeterServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGreeterServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreeterServiceServer will result in compilation errors.