Documentation ¶
Index ¶
Constants ¶
const (
HelloHTTP_SayHello_FullMethodName = "/hello.HelloHTTP/SayHello"
)
Variables ¶
var File_hello_hello_proto protoreflect.FileDescriptor
var HelloHTTP_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello.HelloHTTP", HandlerType: (*HelloHTTPServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _HelloHTTP_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "hello/hello.proto", }
HelloHTTP_ServiceDesc is the grpc.ServiceDesc for HelloHTTP service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHelloHTTPServer ¶
func RegisterHelloHTTPServer(s grpc.ServiceRegistrar, srv HelloHTTPServer)
Types ¶
type HelloHTTPClient ¶
type HelloHTTPClient interface { // 定义SayHello方法 SayHello(ctx context.Context, in *HelloHTTPRequest, opts ...grpc.CallOption) (*HelloHTTPResponse, error) }
HelloHTTPClient is the client API for HelloHTTP 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 NewHelloHTTPClient ¶
func NewHelloHTTPClient(cc grpc.ClientConnInterface) HelloHTTPClient
type HelloHTTPRequest ¶
type HelloHTTPRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
HelloRequest 请求结构
func (*HelloHTTPRequest) Descriptor
deprecated
func (*HelloHTTPRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloHTTPRequest.ProtoReflect.Descriptor instead.
func (*HelloHTTPRequest) GetName ¶
func (x *HelloHTTPRequest) GetName() string
func (*HelloHTTPRequest) ProtoMessage ¶
func (*HelloHTTPRequest) ProtoMessage()
func (*HelloHTTPRequest) ProtoReflect ¶
func (x *HelloHTTPRequest) ProtoReflect() protoreflect.Message
func (*HelloHTTPRequest) Reset ¶
func (x *HelloHTTPRequest) Reset()
func (*HelloHTTPRequest) String ¶
func (x *HelloHTTPRequest) String() string
type HelloHTTPResponse ¶
type HelloHTTPResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
HelloResponse 响应结构
func (*HelloHTTPResponse) Descriptor
deprecated
func (*HelloHTTPResponse) Descriptor() ([]byte, []int)
Deprecated: Use HelloHTTPResponse.ProtoReflect.Descriptor instead.
func (*HelloHTTPResponse) GetMessage ¶
func (x *HelloHTTPResponse) GetMessage() string
func (*HelloHTTPResponse) ProtoMessage ¶
func (*HelloHTTPResponse) ProtoMessage()
func (*HelloHTTPResponse) ProtoReflect ¶
func (x *HelloHTTPResponse) ProtoReflect() protoreflect.Message
func (*HelloHTTPResponse) Reset ¶
func (x *HelloHTTPResponse) Reset()
func (*HelloHTTPResponse) String ¶
func (x *HelloHTTPResponse) String() string
type HelloHTTPServer ¶
type HelloHTTPServer interface { // 定义SayHello方法 SayHello(context.Context, *HelloHTTPRequest) (*HelloHTTPResponse, error) }
HelloHTTPServer is the server API for HelloHTTP service. All implementations should embed UnimplementedHelloHTTPServer for forward compatibility
type UnimplementedHelloHTTPServer ¶
type UnimplementedHelloHTTPServer struct { }
UnimplementedHelloHTTPServer should be embedded to have forward compatible implementations.
func (UnimplementedHelloHTTPServer) SayHello ¶
func (UnimplementedHelloHTTPServer) SayHello(context.Context, *HelloHTTPRequest) (*HelloHTTPResponse, error)
type UnsafeHelloHTTPServer ¶
type UnsafeHelloHTTPServer interface {
// contains filtered or unexported methods
}
UnsafeHelloHTTPServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HelloHTTPServer will result in compilation errors.