Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_pb_greeting_proto protoreflect.FileDescriptor
var Greet_ServiceDesc = grpc.ServiceDesc{ ServiceName: "greet.Greet", HandlerType: (*GreetServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _Greet_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/greeting.proto", }
Greet_ServiceDesc is the grpc.ServiceDesc for Greet service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreetServer ¶
func RegisterGreetServer(s grpc.ServiceRegistrar, srv GreetServer)
Types ¶
type GreetClient ¶
type GreetClient interface {
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
GreetClient is the client API for Greet 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 NewGreetClient ¶
func NewGreetClient(cc grpc.ClientConnInterface) GreetClient
type GreetServer ¶
type GreetServer interface { Ping(context.Context, *Request) (*Response, error) // contains filtered or unexported methods }
GreetServer is the server API for Greet service. All implementations must embed UnimplementedGreetServer for forward compatibility
type Request ¶
type Request struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetMessage ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedGreetServer ¶
type UnimplementedGreetServer struct { }
UnimplementedGreetServer must be embedded to have forward compatible implementations.
type UnsafeGreetServer ¶
type UnsafeGreetServer interface {
// contains filtered or unexported methods
}
UnsafeGreetServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreetServer will result in compilation errors.