Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterHuajianHTTPServer(s *http.Server, srv HuajianHTTPServer)
- func RegisterHuajianServer(s grpc.ServiceRegistrar, srv HuajianServer)
- type GetModelReply
- type GetModelRequest
- func (*GetModelRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetModelRequest) GetDbName() string
- func (x *GetModelRequest) GetKey() string
- func (*GetModelRequest) ProtoMessage()
- func (x *GetModelRequest) ProtoReflect() protoreflect.Message
- func (x *GetModelRequest) Reset()
- func (x *GetModelRequest) String() string
- type HuajianClient
- type HuajianHTTPClient
- type HuajianHTTPClientImpl
- type HuajianHTTPServer
- type HuajianServer
- type UnimplementedHuajianServer
- type UnsafeHuajianServer
Constants ¶
const (
Huajian_GetModel_FullMethodName = "/helloworld.v1.Huajian/GetModel"
)
const OperationHuajianGetModel = "/helloworld.v1.Huajian/GetModel"
Variables ¶
var File_api_huajian_v1_huajian_proto protoreflect.FileDescriptor
var Huajian_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helloworld.v1.Huajian", HandlerType: (*HuajianServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetModel", Handler: _Huajian_GetModel_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/huajian/v1/huajian.proto", }
Huajian_ServiceDesc is the grpc.ServiceDesc for Huajian service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHuajianHTTPServer ¶
func RegisterHuajianHTTPServer(s *http.Server, srv HuajianHTTPServer)
func RegisterHuajianServer ¶
func RegisterHuajianServer(s grpc.ServiceRegistrar, srv HuajianServer)
Types ¶
type GetModelReply ¶
type GetModelReply struct { Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*GetModelReply) Descriptor
deprecated
func (*GetModelReply) Descriptor() ([]byte, []int)
Deprecated: Use GetModelReply.ProtoReflect.Descriptor instead.
func (*GetModelReply) GetValue ¶
func (x *GetModelReply) GetValue() []byte
func (*GetModelReply) ProtoMessage ¶
func (*GetModelReply) ProtoMessage()
func (*GetModelReply) ProtoReflect ¶
func (x *GetModelReply) ProtoReflect() protoreflect.Message
func (*GetModelReply) Reset ¶
func (x *GetModelReply) Reset()
func (*GetModelReply) String ¶
func (x *GetModelReply) String() string
type GetModelRequest ¶
type GetModelRequest struct { DbName string `protobuf:"bytes,1,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
The request message containing the db's name.
func (*GetModelRequest) Descriptor
deprecated
func (*GetModelRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetModelRequest.ProtoReflect.Descriptor instead.
func (*GetModelRequest) GetDbName ¶
func (x *GetModelRequest) GetDbName() string
func (*GetModelRequest) GetKey ¶
func (x *GetModelRequest) GetKey() string
func (*GetModelRequest) ProtoMessage ¶
func (*GetModelRequest) ProtoMessage()
func (*GetModelRequest) ProtoReflect ¶
func (x *GetModelRequest) ProtoReflect() protoreflect.Message
func (*GetModelRequest) Reset ¶
func (x *GetModelRequest) Reset()
func (*GetModelRequest) String ¶
func (x *GetModelRequest) String() string
type HuajianClient ¶
type HuajianClient interface { // Sends a greeting GetModel(ctx context.Context, in *GetModelRequest, opts ...grpc.CallOption) (*GetModelReply, error) }
HuajianClient is the client API for Huajian 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 NewHuajianClient ¶
func NewHuajianClient(cc grpc.ClientConnInterface) HuajianClient
type HuajianHTTPClient ¶
type HuajianHTTPClient interface {
GetModel(ctx context.Context, req *GetModelRequest, opts ...http.CallOption) (rsp *GetModelReply, err error)
}
func NewHuajianHTTPClient ¶
func NewHuajianHTTPClient(client *http.Client) HuajianHTTPClient
type HuajianHTTPClientImpl ¶
type HuajianHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*HuajianHTTPClientImpl) GetModel ¶
func (c *HuajianHTTPClientImpl) GetModel(ctx context.Context, in *GetModelRequest, opts ...http.CallOption) (*GetModelReply, error)
type HuajianHTTPServer ¶
type HuajianHTTPServer interface { // GetModel Sends a greeting GetModel(context.Context, *GetModelRequest) (*GetModelReply, error) }
type HuajianServer ¶
type HuajianServer interface { // Sends a greeting GetModel(context.Context, *GetModelRequest) (*GetModelReply, error) // contains filtered or unexported methods }
HuajianServer is the server API for Huajian service. All implementations must embed UnimplementedHuajianServer for forward compatibility
type UnimplementedHuajianServer ¶
type UnimplementedHuajianServer struct { }
UnimplementedHuajianServer must be embedded to have forward compatible implementations.
func (UnimplementedHuajianServer) GetModel ¶
func (UnimplementedHuajianServer) GetModel(context.Context, *GetModelRequest) (*GetModelReply, error)
type UnsafeHuajianServer ¶
type UnsafeHuajianServer interface {
// contains filtered or unexported methods
}
UnsafeHuajianServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HuajianServer will result in compilation errors.