Documentation ¶
Index ¶
- Variables
- func RegisterKeyValueServiceServer(s *grpc.Server, srv KeyValueServiceServer)
- type Block
- type Head
- func (*Head) Descriptor() ([]byte, []int)deprecated
- func (x *Head) GetDiskSize() int64
- func (x *Head) GetExpiresAt() uint64
- func (x *Head) GetMetadata() int32
- func (x *Head) GetVersion() uint64
- func (*Head) ProtoMessage()
- func (x *Head) ProtoReflect() protoreflect.Message
- func (x *Head) Reset()
- func (x *Head) String() string
- type Key
- func (*Key) Descriptor() ([]byte, []int)deprecated
- func (x *Key) GetMajorKey() []byte
- func (x *Key) GetMinorKey() []byte
- func (x *Key) GetRegionName() []byte
- func (x *Key) GetTimestamp() *TimeUUID
- func (*Key) ProtoMessage()
- func (x *Key) ProtoReflect() protoreflect.Message
- func (x *Key) Reset()
- func (x *Key) String() string
- type KeyRequest
- func (*KeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *KeyRequest) GetHeadOnly() bool
- func (x *KeyRequest) GetKey() *Key
- func (x *KeyRequest) GetTimeout() int32
- func (*KeyRequest) ProtoMessage()
- func (x *KeyRequest) ProtoReflect() protoreflect.Message
- func (x *KeyRequest) Reset()
- func (x *KeyRequest) String() string
- type KeyValueServiceClient
- type KeyValueServiceServer
- type KeyValueService_GetRegionClient
- type KeyValueService_GetRegionServer
- type KeyValueService_GetRowClient
- type KeyValueService_GetRowServer
- type KeyValueService_GetSpaceClient
- type KeyValueService_GetSpaceServer
- type KeyValueService_ScanClient
- type KeyValueService_ScanServer
- type RangeRequest
- func (*RangeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RangeRequest) GetHeadOnly() bool
- func (x *RangeRequest) GetKey() *Key
- func (x *RangeRequest) GetNumRecords() int32
- func (x *RangeRequest) GetTimeout() int32
- func (x *RangeRequest) GetType() RangeType
- func (*RangeRequest) ProtoMessage()
- func (x *RangeRequest) ProtoReflect() protoreflect.Message
- func (x *RangeRequest) Reset()
- func (x *RangeRequest) String() string
- type RangeType
- type Record
- type RecordRequest
- func (*RecordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RecordRequest) GetCompareAndSet() bool
- func (x *RecordRequest) GetKey() *Key
- func (x *RecordRequest) GetMetadata() int32
- func (x *RecordRequest) GetTimeout() int32
- func (x *RecordRequest) GetTtlSeconds() int64
- func (x *RecordRequest) GetValue() []byte
- func (x *RecordRequest) GetVersion() uint64
- func (*RecordRequest) ProtoMessage()
- func (x *RecordRequest) ProtoReflect() protoreflect.Message
- func (x *RecordRequest) Reset()
- func (x *RecordRequest) String() string
- type ScanRequest
- type Status
- type TimeUUID
- type UnimplementedKeyValueServiceServer
- func (*UnimplementedKeyValueServiceServer) Get(context.Context, *KeyRequest) (*Record, error)
- func (*UnimplementedKeyValueServiceServer) GetRange(context.Context, *RangeRequest) (*Block, error)
- func (*UnimplementedKeyValueServiceServer) GetRecent(context.Context, *KeyRequest) (*Record, error)
- func (*UnimplementedKeyValueServiceServer) GetRegion(*KeyRequest, KeyValueService_GetRegionServer) error
- func (*UnimplementedKeyValueServiceServer) GetRow(*KeyRequest, KeyValueService_GetRowServer) error
- func (*UnimplementedKeyValueServiceServer) GetSpace(*KeyRequest, KeyValueService_GetSpaceServer) error
- func (*UnimplementedKeyValueServiceServer) Put(context.Context, *RecordRequest) (*Status, error)
- func (*UnimplementedKeyValueServiceServer) Remove(context.Context, *KeyRequest) (*Status, error)
- func (*UnimplementedKeyValueServiceServer) Scan(*ScanRequest, KeyValueService_ScanServer) error
- func (*UnimplementedKeyValueServiceServer) Touch(context.Context, *RecordRequest) (*Status, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RangeType_name = map[int32]string{ 0: "LESS_OR_EQUAL", } RangeType_value = map[string]int32{ "LESS_OR_EQUAL": 0, } )
Enum value maps for RangeType.
View Source
var File_cserverpb_proto protoreflect.FileDescriptor
Functions ¶
func RegisterKeyValueServiceServer ¶
func RegisterKeyValueServiceServer(s *grpc.Server, srv KeyValueServiceServer)
Types ¶
type Block ¶
type Block struct { Record []*Record `protobuf:"bytes,1,rep,name=record,proto3" json:"record,omitempty"` // contains filtered or unexported fields }
func (*Block) Descriptor
deprecated
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type Head ¶
type Head struct { Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` ExpiresAt uint64 `protobuf:"varint,2,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` DiskSize int64 `protobuf:"varint,3,opt,name=diskSize,proto3" json:"diskSize,omitempty"` Metadata int32 `protobuf:"varint,4,opt,name=metadata,proto3" json:"metadata,omitempty"` // for user 8 bits only, 9 bit deletedBit // contains filtered or unexported fields }
func (*Head) Descriptor
deprecated
func (*Head) GetDiskSize ¶
func (*Head) GetExpiresAt ¶
func (*Head) GetMetadata ¶
func (*Head) GetVersion ¶
func (*Head) ProtoMessage ¶
func (*Head) ProtoMessage()
func (*Head) ProtoReflect ¶
func (x *Head) ProtoReflect() protoreflect.Message
type Key ¶
type Key struct { MajorKey []byte `protobuf:"bytes,1,opt,name=majorKey,proto3" json:"majorKey,omitempty"` // used as a partition key, good candidate is accountId, if empty - data replicated in all partitions RegionName []byte `protobuf:"bytes,2,opt,name=regionName,proto3" json:"regionName,omitempty"` MinorKey []byte `protobuf:"bytes,3,opt,name=minorKey,proto3" json:"minorKey,omitempty"` // used as a record key in the partition Timestamp *TimeUUID `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // timestamp in TimeUUID if present // contains filtered or unexported fields }
func (*Key) Descriptor
deprecated
func (*Key) GetMajorKey ¶
func (*Key) GetMinorKey ¶
func (*Key) GetRegionName ¶
func (*Key) GetTimestamp ¶
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
func (*Key) ProtoReflect ¶
func (x *Key) ProtoReflect() protoreflect.Message
type KeyRequest ¶
type KeyRequest struct { Key *Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` HeadOnly bool `protobuf:"varint,2,opt,name=headOnly,proto3" json:"headOnly,omitempty"` Timeout int32 `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty"` // SLA of the operation if not 0 // contains filtered or unexported fields }
func (*KeyRequest) Descriptor
deprecated
func (*KeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use KeyRequest.ProtoReflect.Descriptor instead.
func (*KeyRequest) GetHeadOnly ¶
func (x *KeyRequest) GetHeadOnly() bool
func (*KeyRequest) GetKey ¶
func (x *KeyRequest) GetKey() *Key
func (*KeyRequest) GetTimeout ¶
func (x *KeyRequest) GetTimeout() int32
func (*KeyRequest) ProtoMessage ¶
func (*KeyRequest) ProtoMessage()
func (*KeyRequest) ProtoReflect ¶
func (x *KeyRequest) ProtoReflect() protoreflect.Message
func (*KeyRequest) Reset ¶
func (x *KeyRequest) Reset()
func (*KeyRequest) String ¶
func (x *KeyRequest) String() string
type KeyValueServiceClient ¶
type KeyValueServiceClient interface { // // Gets exact match entry // Get(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (*Record, error) // // Gets early or equal timestamp entry // GetRecent(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (*Record, error) // // Gets range of timestamps inside a row // GetRange(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*Block, error) // // Gets the whole raw of records with all available timestamps with latest versions // GetRow(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (KeyValueService_GetRowClient, error) // // Gets the whole region of records // GetRegion(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (KeyValueService_GetRegionClient, error) // // Gets the whole space of records associated with majorKey // GetSpace(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (KeyValueService_GetSpaceClient, error) // // Gets all records // Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (KeyValueService_ScanClient, error) // // Touches the record // Touch(ctx context.Context, in *RecordRequest, opts ...grpc.CallOption) (*Status, error) // // Puts the record // Put(ctx context.Context, in *RecordRequest, opts ...grpc.CallOption) (*Status, error) // // Remove the record // Remove(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (*Status, error) }
KeyValueServiceClient is the client API for KeyValueService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewKeyValueServiceClient ¶
func NewKeyValueServiceClient(cc grpc.ClientConnInterface) KeyValueServiceClient
type KeyValueServiceServer ¶
type KeyValueServiceServer interface { // // Gets exact match entry // Get(context.Context, *KeyRequest) (*Record, error) // // Gets early or equal timestamp entry // GetRecent(context.Context, *KeyRequest) (*Record, error) // // Gets range of timestamps inside a row // GetRange(context.Context, *RangeRequest) (*Block, error) // // Gets the whole raw of records with all available timestamps with latest versions // GetRow(*KeyRequest, KeyValueService_GetRowServer) error // // Gets the whole region of records // GetRegion(*KeyRequest, KeyValueService_GetRegionServer) error // // Gets the whole space of records associated with majorKey // GetSpace(*KeyRequest, KeyValueService_GetSpaceServer) error // // Gets all records // Scan(*ScanRequest, KeyValueService_ScanServer) error // // Touches the record // Touch(context.Context, *RecordRequest) (*Status, error) // // Puts the record // Put(context.Context, *RecordRequest) (*Status, error) // // Remove the record // Remove(context.Context, *KeyRequest) (*Status, error) }
KeyValueServiceServer is the server API for KeyValueService service.
type KeyValueService_GetRegionClient ¶
type KeyValueService_GetRegionClient interface { Recv() (*Block, error) grpc.ClientStream }
type KeyValueService_GetRegionServer ¶
type KeyValueService_GetRegionServer interface { Send(*Block) error grpc.ServerStream }
type KeyValueService_GetRowClient ¶
type KeyValueService_GetRowClient interface { Recv() (*Block, error) grpc.ClientStream }
type KeyValueService_GetRowServer ¶
type KeyValueService_GetRowServer interface { Send(*Block) error grpc.ServerStream }
type KeyValueService_GetSpaceClient ¶
type KeyValueService_GetSpaceClient interface { Recv() (*Block, error) grpc.ClientStream }
type KeyValueService_GetSpaceServer ¶
type KeyValueService_GetSpaceServer interface { Send(*Block) error grpc.ServerStream }
type KeyValueService_ScanClient ¶
type KeyValueService_ScanClient interface { Recv() (*Block, error) grpc.ClientStream }
type KeyValueService_ScanServer ¶
type KeyValueService_ScanServer interface { Send(*Block) error grpc.ServerStream }
type RangeRequest ¶
type RangeRequest struct { Key *Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` HeadOnly bool `protobuf:"varint,2,opt,name=headOnly,proto3" json:"headOnly,omitempty"` Type RangeType `protobuf:"varint,4,opt,name=type,proto3,enum=cdb.RangeType" json:"type,omitempty"` NumRecords int32 `protobuf:"varint,5,opt,name=numRecords,proto3" json:"numRecords,omitempty"` Timeout int32 `protobuf:"varint,6,opt,name=timeout,proto3" json:"timeout,omitempty"` // SLA of the operation // contains filtered or unexported fields }
func (*RangeRequest) Descriptor
deprecated
func (*RangeRequest) Descriptor() ([]byte, []int)
Deprecated: Use RangeRequest.ProtoReflect.Descriptor instead.
func (*RangeRequest) GetHeadOnly ¶
func (x *RangeRequest) GetHeadOnly() bool
func (*RangeRequest) GetKey ¶
func (x *RangeRequest) GetKey() *Key
func (*RangeRequest) GetNumRecords ¶
func (x *RangeRequest) GetNumRecords() int32
func (*RangeRequest) GetTimeout ¶
func (x *RangeRequest) GetTimeout() int32
func (*RangeRequest) GetType ¶
func (x *RangeRequest) GetType() RangeType
func (*RangeRequest) ProtoMessage ¶
func (*RangeRequest) ProtoMessage()
func (*RangeRequest) ProtoReflect ¶
func (x *RangeRequest) ProtoReflect() protoreflect.Message
func (*RangeRequest) Reset ¶
func (x *RangeRequest) Reset()
func (*RangeRequest) String ¶
func (x *RangeRequest) String() string
type RangeType ¶
type RangeType int32
const (
RangeType_LESS_OR_EQUAL RangeType = 0
)
func (RangeType) Descriptor ¶
func (RangeType) Descriptor() protoreflect.EnumDescriptor
func (RangeType) EnumDescriptor
deprecated
func (RangeType) Number ¶
func (x RangeType) Number() protoreflect.EnumNumber
func (RangeType) Type ¶
func (RangeType) Type() protoreflect.EnumType
type Record ¶
type Record struct { Key *Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Head *Head `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"` // if exists, then record was found Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Record) Descriptor
deprecated
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
type RecordRequest ¶
type RecordRequest struct { Key *Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Metadata int32 `protobuf:"varint,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // for user 8 bits only, 9 bit deletedBit TtlSeconds int64 `protobuf:"varint,4,opt,name=ttlSeconds,proto3" json:"ttlSeconds,omitempty"` // add TTL in seconds if not 0, zero means no TTL CompareAndSet bool `protobuf:"varint,6,opt,name=compareAndSet,proto3" json:"compareAndSet,omitempty"` Version uint64 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` // if 0 then putIfAbsent Timeout int32 `protobuf:"varint,8,opt,name=timeout,proto3" json:"timeout,omitempty"` // SLA of the operation if not 0 // contains filtered or unexported fields }
func (*RecordRequest) Descriptor
deprecated
func (*RecordRequest) Descriptor() ([]byte, []int)
Deprecated: Use RecordRequest.ProtoReflect.Descriptor instead.
func (*RecordRequest) GetCompareAndSet ¶
func (x *RecordRequest) GetCompareAndSet() bool
func (*RecordRequest) GetKey ¶
func (x *RecordRequest) GetKey() *Key
func (*RecordRequest) GetMetadata ¶
func (x *RecordRequest) GetMetadata() int32
func (*RecordRequest) GetTimeout ¶
func (x *RecordRequest) GetTimeout() int32
func (*RecordRequest) GetTtlSeconds ¶
func (x *RecordRequest) GetTtlSeconds() int64
func (*RecordRequest) GetValue ¶
func (x *RecordRequest) GetValue() []byte
func (*RecordRequest) GetVersion ¶
func (x *RecordRequest) GetVersion() uint64
func (*RecordRequest) ProtoMessage ¶
func (*RecordRequest) ProtoMessage()
func (*RecordRequest) ProtoReflect ¶
func (x *RecordRequest) ProtoReflect() protoreflect.Message
func (*RecordRequest) Reset ¶
func (x *RecordRequest) Reset()
func (*RecordRequest) String ¶
func (x *RecordRequest) String() string
type ScanRequest ¶
type ScanRequest struct { HeadOnly bool `protobuf:"varint,1,opt,name=headOnly,proto3" json:"headOnly,omitempty"` // contains filtered or unexported fields }
func (*ScanRequest) Descriptor
deprecated
func (*ScanRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScanRequest.ProtoReflect.Descriptor instead.
func (*ScanRequest) GetHeadOnly ¶
func (x *ScanRequest) GetHeadOnly() bool
func (*ScanRequest) ProtoMessage ¶
func (*ScanRequest) ProtoMessage()
func (*ScanRequest) ProtoReflect ¶
func (x *ScanRequest) ProtoReflect() protoreflect.Message
func (*ScanRequest) Reset ¶
func (x *ScanRequest) Reset()
func (*ScanRequest) String ¶
func (x *ScanRequest) String() string
type Status ¶
type Status struct { Updated bool `protobuf:"varint,1,opt,name=updated,proto3" json:"updated,omitempty"` // contains filtered or unexported fields }
func (*Status) Descriptor
deprecated
func (*Status) GetUpdated ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type TimeUUID ¶
type TimeUUID struct { MostSigBits int64 `protobuf:"varint,1,opt,name=mostSigBits,proto3" json:"mostSigBits,omitempty"` LeastSigBits int64 `protobuf:"varint,2,opt,name=leastSigBits,proto3" json:"leastSigBits,omitempty"` // contains filtered or unexported fields }
Java compatible
func (*TimeUUID) Descriptor
deprecated
func (*TimeUUID) GetLeastSigBits ¶
func (*TimeUUID) GetMostSigBits ¶
func (*TimeUUID) ProtoMessage ¶
func (*TimeUUID) ProtoMessage()
func (*TimeUUID) ProtoReflect ¶
func (x *TimeUUID) ProtoReflect() protoreflect.Message
type UnimplementedKeyValueServiceServer ¶
type UnimplementedKeyValueServiceServer struct { }
UnimplementedKeyValueServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedKeyValueServiceServer) Get ¶
func (*UnimplementedKeyValueServiceServer) Get(context.Context, *KeyRequest) (*Record, error)
func (*UnimplementedKeyValueServiceServer) GetRange ¶
func (*UnimplementedKeyValueServiceServer) GetRange(context.Context, *RangeRequest) (*Block, error)
func (*UnimplementedKeyValueServiceServer) GetRecent ¶
func (*UnimplementedKeyValueServiceServer) GetRecent(context.Context, *KeyRequest) (*Record, error)
func (*UnimplementedKeyValueServiceServer) GetRegion ¶
func (*UnimplementedKeyValueServiceServer) GetRegion(*KeyRequest, KeyValueService_GetRegionServer) error
func (*UnimplementedKeyValueServiceServer) GetRow ¶
func (*UnimplementedKeyValueServiceServer) GetRow(*KeyRequest, KeyValueService_GetRowServer) error
func (*UnimplementedKeyValueServiceServer) GetSpace ¶
func (*UnimplementedKeyValueServiceServer) GetSpace(*KeyRequest, KeyValueService_GetSpaceServer) error
func (*UnimplementedKeyValueServiceServer) Put ¶
func (*UnimplementedKeyValueServiceServer) Put(context.Context, *RecordRequest) (*Status, error)
func (*UnimplementedKeyValueServiceServer) Remove ¶
func (*UnimplementedKeyValueServiceServer) Remove(context.Context, *KeyRequest) (*Status, error)
func (*UnimplementedKeyValueServiceServer) Scan ¶
func (*UnimplementedKeyValueServiceServer) Scan(*ScanRequest, KeyValueService_ScanServer) error
func (*UnimplementedKeyValueServiceServer) Touch ¶
func (*UnimplementedKeyValueServiceServer) Touch(context.Context, *RecordRequest) (*Status, error)
Click to show internal directories.
Click to hide internal directories.