Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_grpc_internal_testgrpc_test_proto protoreflect.FileDescriptor
var PingPong_ServiceDesc = grpc.ServiceDesc{ ServiceName: "testgrpc.PingPong", HandlerType: (*PingPongServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _PingPong_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "grpc/internal/testgrpc/test.proto", }
PingPong_ServiceDesc is the grpc.ServiceDesc for PingPong service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPingPongServer ¶
func RegisterPingPongServer(s grpc.ServiceRegistrar, srv PingPongServer)
Types ¶
type PingPongClient ¶
type PingPongClient interface {
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error)
}
PingPongClient is the client API for PingPong 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 NewPingPongClient ¶
func NewPingPongClient(cc grpc.ClientConnInterface) PingPongClient
type PingPongServer ¶
type PingPongServer interface { Ping(context.Context, *PingRequest) (*PingReply, error) // contains filtered or unexported methods }
PingPongServer is the server API for PingPong service. All implementations must embed UnimplementedPingPongServer for forward compatibility
type PingReply ¶
type PingReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*PingReply) Descriptor
deprecated
func (*PingReply) GetMessage ¶
func (*PingReply) ProtoMessage ¶
func (*PingReply) ProtoMessage()
func (*PingReply) ProtoReflect ¶
func (x *PingReply) ProtoReflect() protoreflect.Message
type PingRequest ¶
type PingRequest struct { Caller string `protobuf:"bytes,1,opt,name=caller,proto3" json:"caller,omitempty"` // contains filtered or unexported fields }
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) GetCaller ¶
func (x *PingRequest) GetCaller() string
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type UnimplementedPingPongServer ¶
type UnimplementedPingPongServer struct { }
UnimplementedPingPongServer must be embedded to have forward compatible implementations.
func (UnimplementedPingPongServer) Ping ¶
func (UnimplementedPingPongServer) Ping(context.Context, *PingRequest) (*PingReply, error)
type UnsafePingPongServer ¶
type UnsafePingPongServer interface {
// contains filtered or unexported methods
}
UnsafePingPongServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PingPongServer will result in compilation errors.