Documentation ¶
Index ¶
- Variables
- func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
- type HelloServiceClient
- type HelloServiceServer
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetDate() string
- func (x *Request) GetId() string
- func (x *Request) GetMsg() string
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- type UnimplementedHelloServiceServer
- type UnsafeHelloServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_hello_hello_proto protoreflect.FileDescriptor
var HelloService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello.HelloService", HandlerType: (*HelloServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _HelloService_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "hello/hello.proto", }
HelloService_ServiceDesc is the grpc.ServiceDesc for HelloService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHelloServiceServer ¶
func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
Types ¶
type HelloServiceClient ¶
type HelloServiceClient interface {
SayHello(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
HelloServiceClient is the client API for HelloService 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 NewHelloServiceClient ¶
func NewHelloServiceClient(cc grpc.ClientConnInterface) HelloServiceClient
type HelloServiceServer ¶
type HelloServiceServer interface { SayHello(context.Context, *Request) (*Response, error) // contains filtered or unexported methods }
HelloServiceServer is the server API for HelloService service. All implementations must embed UnimplementedHelloServiceServer for forward compatibility
type Request ¶
type Request struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` Date string `protobuf:"bytes,3,opt,name=date,proto3" json:"date,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 { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedHelloServiceServer ¶
type UnimplementedHelloServiceServer struct { }
UnimplementedHelloServiceServer must be embedded to have forward compatible implementations.
type UnsafeHelloServiceServer ¶
type UnsafeHelloServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHelloServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HelloServiceServer will result in compilation errors.