Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterConfigRpcServer(s grpc.ServiceRegistrar, srv ConfigRpcServer)
- type ConfigRpcClient
- type ConfigRpcServer
- type EmptyReq
- type EmptyResp
- type FindConfigReq
- type FindConfigResp
- type IdReq
- type IdsReq
- type SaveConfigReq
- func (*SaveConfigReq) Descriptor() ([]byte, []int)deprecated
- func (x *SaveConfigReq) GetConfigKey() string
- func (x *SaveConfigReq) GetConfigValue() string
- func (*SaveConfigReq) ProtoMessage()
- func (x *SaveConfigReq) ProtoReflect() protoreflect.Message
- func (x *SaveConfigReq) Reset()
- func (x *SaveConfigReq) String() string
- type SaveConfigResp
- type UnimplementedConfigRpcServer
- type UnsafeConfigRpcServer
Constants ¶
const ( ConfigRpc_SaveConfig_FullMethodName = "/configrpc.ConfigRpc/SaveConfig" ConfigRpc_FindConfig_FullMethodName = "/configrpc.ConfigRpc/FindConfig" )
Variables ¶
var ConfigRpc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "configrpc.ConfigRpc", HandlerType: (*ConfigRpcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SaveConfig", Handler: _ConfigRpc_SaveConfig_Handler, }, { MethodName: "FindConfig", Handler: _ConfigRpc_FindConfig_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "config.proto", }
ConfigRpc_ServiceDesc is the grpc.ServiceDesc for ConfigRpc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_config_proto protoreflect.FileDescriptor
Functions ¶
func RegisterConfigRpcServer ¶
func RegisterConfigRpcServer(s grpc.ServiceRegistrar, srv ConfigRpcServer)
Types ¶
type ConfigRpcClient ¶
type ConfigRpcClient interface { // 保存配置 SaveConfig(ctx context.Context, in *SaveConfigReq, opts ...grpc.CallOption) (*SaveConfigResp, error) // 查询配置 FindConfig(ctx context.Context, in *FindConfigReq, opts ...grpc.CallOption) (*FindConfigResp, error) }
ConfigRpcClient is the client API for ConfigRpc 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 NewConfigRpcClient ¶
func NewConfigRpcClient(cc grpc.ClientConnInterface) ConfigRpcClient
type ConfigRpcServer ¶
type ConfigRpcServer interface { // 保存配置 SaveConfig(context.Context, *SaveConfigReq) (*SaveConfigResp, error) // 查询配置 FindConfig(context.Context, *FindConfigReq) (*FindConfigResp, error) // contains filtered or unexported methods }
ConfigRpcServer is the server API for ConfigRpc service. All implementations must embed UnimplementedConfigRpcServer for forward compatibility
type EmptyReq ¶
type EmptyReq struct {
// contains filtered or unexported fields
}
func (*EmptyReq) Descriptor
deprecated
func (*EmptyReq) ProtoMessage ¶
func (*EmptyReq) ProtoMessage()
func (*EmptyReq) ProtoReflect ¶
func (x *EmptyReq) ProtoReflect() protoreflect.Message
type EmptyResp ¶
type EmptyResp struct {
// contains filtered or unexported fields
}
func (*EmptyResp) Descriptor
deprecated
func (*EmptyResp) ProtoMessage ¶
func (*EmptyResp) ProtoMessage()
func (*EmptyResp) ProtoReflect ¶
func (x *EmptyResp) ProtoReflect() protoreflect.Message
type FindConfigReq ¶
type FindConfigReq struct { ConfigKey string `protobuf:"bytes,1,opt,name=config_key,json=configKey,proto3" json:"config_key,omitempty"` // contains filtered or unexported fields }
func (*FindConfigReq) Descriptor
deprecated
func (*FindConfigReq) Descriptor() ([]byte, []int)
Deprecated: Use FindConfigReq.ProtoReflect.Descriptor instead.
func (*FindConfigReq) GetConfigKey ¶
func (x *FindConfigReq) GetConfigKey() string
func (*FindConfigReq) ProtoMessage ¶
func (*FindConfigReq) ProtoMessage()
func (*FindConfigReq) ProtoReflect ¶
func (x *FindConfigReq) ProtoReflect() protoreflect.Message
func (*FindConfigReq) Reset ¶
func (x *FindConfigReq) Reset()
func (*FindConfigReq) String ¶
func (x *FindConfigReq) String() string
type FindConfigResp ¶
type FindConfigResp struct { ConfigValue string `protobuf:"bytes,1,opt,name=config_value,json=configValue,proto3" json:"config_value,omitempty"` // contains filtered or unexported fields }
func (*FindConfigResp) Descriptor
deprecated
func (*FindConfigResp) Descriptor() ([]byte, []int)
Deprecated: Use FindConfigResp.ProtoReflect.Descriptor instead.
func (*FindConfigResp) GetConfigValue ¶
func (x *FindConfigResp) GetConfigValue() string
func (*FindConfigResp) ProtoMessage ¶
func (*FindConfigResp) ProtoMessage()
func (*FindConfigResp) ProtoReflect ¶
func (x *FindConfigResp) ProtoReflect() protoreflect.Message
func (*FindConfigResp) Reset ¶
func (x *FindConfigResp) Reset()
func (*FindConfigResp) String ¶
func (x *FindConfigResp) String() string
type IdReq ¶
type IdReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*IdReq) Descriptor
deprecated
func (*IdReq) ProtoMessage ¶
func (*IdReq) ProtoMessage()
func (*IdReq) ProtoReflect ¶
func (x *IdReq) ProtoReflect() protoreflect.Message
type IdsReq ¶
type IdsReq struct { Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*IdsReq) Descriptor
deprecated
func (*IdsReq) ProtoMessage ¶
func (*IdsReq) ProtoMessage()
func (*IdsReq) ProtoReflect ¶
func (x *IdsReq) ProtoReflect() protoreflect.Message
type SaveConfigReq ¶
type SaveConfigReq struct { ConfigKey string `protobuf:"bytes,1,opt,name=config_key,json=configKey,proto3" json:"config_key,omitempty"` ConfigValue string `protobuf:"bytes,2,opt,name=config_value,json=configValue,proto3" json:"config_value,omitempty"` // contains filtered or unexported fields }
func (*SaveConfigReq) Descriptor
deprecated
func (*SaveConfigReq) Descriptor() ([]byte, []int)
Deprecated: Use SaveConfigReq.ProtoReflect.Descriptor instead.
func (*SaveConfigReq) GetConfigKey ¶
func (x *SaveConfigReq) GetConfigKey() string
func (*SaveConfigReq) GetConfigValue ¶
func (x *SaveConfigReq) GetConfigValue() string
func (*SaveConfigReq) ProtoMessage ¶
func (*SaveConfigReq) ProtoMessage()
func (*SaveConfigReq) ProtoReflect ¶
func (x *SaveConfigReq) ProtoReflect() protoreflect.Message
func (*SaveConfigReq) Reset ¶
func (x *SaveConfigReq) Reset()
func (*SaveConfigReq) String ¶
func (x *SaveConfigReq) String() string
type SaveConfigResp ¶
type SaveConfigResp struct {
// contains filtered or unexported fields
}
func (*SaveConfigResp) Descriptor
deprecated
func (*SaveConfigResp) Descriptor() ([]byte, []int)
Deprecated: Use SaveConfigResp.ProtoReflect.Descriptor instead.
func (*SaveConfigResp) ProtoMessage ¶
func (*SaveConfigResp) ProtoMessage()
func (*SaveConfigResp) ProtoReflect ¶
func (x *SaveConfigResp) ProtoReflect() protoreflect.Message
func (*SaveConfigResp) Reset ¶
func (x *SaveConfigResp) Reset()
func (*SaveConfigResp) String ¶
func (x *SaveConfigResp) String() string
type UnimplementedConfigRpcServer ¶
type UnimplementedConfigRpcServer struct { }
UnimplementedConfigRpcServer must be embedded to have forward compatible implementations.
func (UnimplementedConfigRpcServer) FindConfig ¶
func (UnimplementedConfigRpcServer) FindConfig(context.Context, *FindConfigReq) (*FindConfigResp, error)
func (UnimplementedConfigRpcServer) SaveConfig ¶
func (UnimplementedConfigRpcServer) SaveConfig(context.Context, *SaveConfigReq) (*SaveConfigResp, error)
type UnsafeConfigRpcServer ¶
type UnsafeConfigRpcServer interface {
// contains filtered or unexported methods
}
UnsafeConfigRpcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConfigRpcServer will result in compilation errors.