kvV2

package
v6.0.0-beta.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
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

View Source
var File_kv_v2_kv_proto protoreflect.FileDescriptor
View Source
var File_kv_v2_request_proto protoreflect.FileDescriptor
View Source
var File_kv_v2_response_proto protoreflect.FileDescriptor
View Source
var File_kv_v2_service_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use KvItem.ProtoReflect.Descriptor instead.

func (*KvItem) GetKey

func (x *KvItem) GetKey() string

func (*KvItem) GetTtl

func (x *KvItem) GetTtl() *durationpb.Duration

func (*KvItem) GetValue

func (x *KvItem) GetValue() []byte

func (*KvItem) ProtoMessage

func (*KvItem) ProtoMessage()

func (*KvItem) ProtoReflect

func (x *KvItem) ProtoReflect() protoreflect.Message

func (*KvItem) Reset

func (x *KvItem) Reset()

func (*KvItem) String

func (x *KvItem) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use KvRequest.ProtoReflect.Descriptor instead.

func (*KvRequest) GetItems

func (x *KvRequest) GetItems() []*KvItem

func (*KvRequest) GetStorage

func (x *KvRequest) GetStorage() string

func (*KvRequest) ProtoMessage

func (*KvRequest) ProtoMessage()

func (*KvRequest) ProtoReflect

func (x *KvRequest) ProtoReflect() protoreflect.Message

func (*KvRequest) Reset

func (x *KvRequest) Reset()

func (*KvRequest) String

func (x *KvRequest) String() string

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) Delete

func (UnimplementedKvServiceServer) Has

func (UnimplementedKvServiceServer) MExpire

func (UnimplementedKvServiceServer) MGet

func (UnimplementedKvServiceServer) Set

func (UnimplementedKvServiceServer) TTL

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL