Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterKvServiceServer(s grpc.ServiceRegistrar, srv KvServiceServer)
- type KvItem
- func (*KvItem) Descriptor() ([]byte, []int)deprecated
- func (x *KvItem) GetKey() string
- func (x *KvItem) GetTtl() *durationpb.Duration
- func (x *KvItem) GetValue() []byte
- func (*KvItem) ProtoMessage()
- func (x *KvItem) ProtoReflect() protoreflect.Message
- func (x *KvItem) Reset()
- func (x *KvItem) String() string
- type KvRequest
- type KvResponse
- type KvServiceClient
- type KvServiceServer
- type UnimplementedKvServiceServer
- func (UnimplementedKvServiceServer) Clear(context.Context, *KvRequest) (*KvResponse, error)
- func (UnimplementedKvServiceServer) Delete(context.Context, *KvRequest) (*KvResponse, error)
- func (UnimplementedKvServiceServer) Has(context.Context, *KvRequest) (*KvResponse, error)
- func (UnimplementedKvServiceServer) MExpire(context.Context, *KvRequest) (*KvResponse, error)
- func (UnimplementedKvServiceServer) MGet(context.Context, *KvRequest) (*KvResponse, error)
- func (UnimplementedKvServiceServer) Set(context.Context, *KvRequest) (*KvResponse, error)
- func (UnimplementedKvServiceServer) TTL(context.Context, *KvRequest) (*KvResponse, error)
- type UnsafeKvServiceServer
Constants ¶
const ( KvService_Has_FullMethodName = "/kv.v2.KvService/Has" KvService_Set_FullMethodName = "/kv.v2.KvService/Set" KvService_MGet_FullMethodName = "/kv.v2.KvService/MGet" KvService_MExpire_FullMethodName = "/kv.v2.KvService/MExpire" KvService_TTL_FullMethodName = "/kv.v2.KvService/TTL" KvService_Delete_FullMethodName = "/kv.v2.KvService/Delete" KvService_Clear_FullMethodName = "/kv.v2.KvService/Clear" )
Variables ¶
var File_kv_v2_kv_proto protoreflect.FileDescriptor
var File_kv_v2_request_proto protoreflect.FileDescriptor
var File_kv_v2_response_proto protoreflect.FileDescriptor
var File_kv_v2_service_proto protoreflect.FileDescriptor
var KvService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "kv.v2.KvService", HandlerType: (*KvServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Has", Handler: _KvService_Has_Handler, }, { MethodName: "Set", Handler: _KvService_Set_Handler, }, { MethodName: "MGet", Handler: _KvService_MGet_Handler, }, { MethodName: "MExpire", Handler: _KvService_MExpire_Handler, }, { MethodName: "TTL", Handler: _KvService_TTL_Handler, }, { MethodName: "Delete", Handler: _KvService_Delete_Handler, }, { MethodName: "Clear", Handler: _KvService_Clear_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "kv/v2/service.proto", }
KvService_ServiceDesc is the grpc.ServiceDesc for KvService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterKvServiceServer ¶
func RegisterKvServiceServer(s grpc.ServiceRegistrar, srv KvServiceServer)
Types ¶
type KvItem ¶
type KvItem struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Ttl *durationpb.Duration `protobuf:"bytes,3,opt,name=ttl,proto3" json:"ttl,omitempty"`
// contains filtered or unexported fields
}
func (*KvItem) Descriptor
deprecated
func (*KvItem) GetTtl ¶
func (x *KvItem) GetTtl() *durationpb.Duration
func (*KvItem) ProtoMessage ¶
func (*KvItem) ProtoMessage()
func (*KvItem) ProtoReflect ¶
func (x *KvItem) ProtoReflect() protoreflect.Message
type KvRequest ¶
type KvRequest struct {
Storage string `protobuf:"bytes,1,opt,name=storage,proto3" json:"storage,omitempty"`
Items []*KvItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
// contains filtered or unexported fields
}
func (*KvRequest) Descriptor
deprecated
func (*KvRequest) GetStorage ¶
func (*KvRequest) ProtoMessage ¶
func (*KvRequest) ProtoMessage()
func (*KvRequest) ProtoReflect ¶
func (x *KvRequest) ProtoReflect() protoreflect.Message
type KvResponse ¶
type KvResponse struct {
Items []*KvItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
// contains filtered or unexported fields
}
func (*KvResponse) Descriptor
deprecated
func (*KvResponse) Descriptor() ([]byte, []int)
Deprecated: Use KvResponse.ProtoReflect.Descriptor instead.
func (*KvResponse) GetItems ¶
func (x *KvResponse) GetItems() []*KvItem
func (*KvResponse) ProtoMessage ¶
func (*KvResponse) ProtoMessage()
func (*KvResponse) ProtoReflect ¶
func (x *KvResponse) ProtoReflect() protoreflect.Message
func (*KvResponse) Reset ¶
func (x *KvResponse) Reset()
func (*KvResponse) String ¶
func (x *KvResponse) String() string
type KvServiceClient ¶
type KvServiceClient interface {
Has(ctx context.Context, in *KvRequest, opts ...grpc.CallOption) (*KvResponse, error)
Set(ctx context.Context, in *KvRequest, opts ...grpc.CallOption) (*KvResponse, error)
MGet(ctx context.Context, in *KvRequest, opts ...grpc.CallOption) (*KvResponse, error)
MExpire(ctx context.Context, in *KvRequest, opts ...grpc.CallOption) (*KvResponse, error)
TTL(ctx context.Context, in *KvRequest, opts ...grpc.CallOption) (*KvResponse, error)
Delete(ctx context.Context, in *KvRequest, opts ...grpc.CallOption) (*KvResponse, error)
Clear(ctx context.Context, in *KvRequest, opts ...grpc.CallOption) (*KvResponse, error)
}
KvServiceClient is the client API for KvService 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 NewKvServiceClient ¶
func NewKvServiceClient(cc grpc.ClientConnInterface) KvServiceClient
type KvServiceServer ¶
type KvServiceServer interface {
Has(context.Context, *KvRequest) (*KvResponse, error)
Set(context.Context, *KvRequest) (*KvResponse, error)
MGet(context.Context, *KvRequest) (*KvResponse, error)
MExpire(context.Context, *KvRequest) (*KvResponse, error)
TTL(context.Context, *KvRequest) (*KvResponse, error)
Delete(context.Context, *KvRequest) (*KvResponse, error)
Clear(context.Context, *KvRequest) (*KvResponse, error)
// contains filtered or unexported methods
}
KvServiceServer is the server API for KvService service. All implementations must embed UnimplementedKvServiceServer for forward compatibility.
type UnimplementedKvServiceServer ¶
type UnimplementedKvServiceServer struct{}
UnimplementedKvServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedKvServiceServer) Clear ¶
func (UnimplementedKvServiceServer) Clear(context.Context, *KvRequest) (*KvResponse, error)
func (UnimplementedKvServiceServer) Delete ¶
func (UnimplementedKvServiceServer) Delete(context.Context, *KvRequest) (*KvResponse, error)
func (UnimplementedKvServiceServer) Has ¶
func (UnimplementedKvServiceServer) Has(context.Context, *KvRequest) (*KvResponse, error)
func (UnimplementedKvServiceServer) MExpire ¶
func (UnimplementedKvServiceServer) MExpire(context.Context, *KvRequest) (*KvResponse, error)
func (UnimplementedKvServiceServer) MGet ¶
func (UnimplementedKvServiceServer) MGet(context.Context, *KvRequest) (*KvResponse, error)
func (UnimplementedKvServiceServer) Set ¶
func (UnimplementedKvServiceServer) Set(context.Context, *KvRequest) (*KvResponse, error)
func (UnimplementedKvServiceServer) TTL ¶
func (UnimplementedKvServiceServer) TTL(context.Context, *KvRequest) (*KvResponse, error)
type UnsafeKvServiceServer ¶
type UnsafeKvServiceServer interface {
// contains filtered or unexported methods
}
UnsafeKvServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KvServiceServer will result in compilation errors.