cserverpb

package
v0.0.0-...-f223905 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetRecord

func (x *Block) GetRecord() []*Record

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

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

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string
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) Descriptor() ([]byte, []int)

Deprecated: Use Head.ProtoReflect.Descriptor instead.

func (*Head) GetDiskSize

func (x *Head) GetDiskSize() int64

func (*Head) GetExpiresAt

func (x *Head) GetExpiresAt() uint64

func (*Head) GetMetadata

func (x *Head) GetMetadata() int32

func (*Head) GetVersion

func (x *Head) GetVersion() uint64

func (*Head) ProtoMessage

func (*Head) ProtoMessage()

func (*Head) ProtoReflect

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

func (*Head) Reset

func (x *Head) Reset()

func (*Head) String

func (x *Head) String() string

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

Deprecated: Use Key.ProtoReflect.Descriptor instead.

func (*Key) GetMajorKey

func (x *Key) GetMajorKey() []byte

func (*Key) GetMinorKey

func (x *Key) GetMinorKey() []byte

func (*Key) GetRegionName

func (x *Key) GetRegionName() []byte

func (*Key) GetTimestamp

func (x *Key) GetTimestamp() *TimeUUID

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) ProtoReflect

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

func (*Key) Reset

func (x *Key) Reset()

func (*Key) String

func (x *Key) String() string

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.

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

func (x RangeType) Enum() *RangeType

func (RangeType) EnumDescriptor deprecated

func (RangeType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RangeType.Descriptor instead.

func (RangeType) Number

func (x RangeType) Number() protoreflect.EnumNumber

func (RangeType) String

func (x RangeType) String() string

func (RangeType) Type

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

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetHead

func (x *Record) GetHead() *Head

func (*Record) GetKey

func (x *Record) GetKey() *Key

func (*Record) GetValue

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

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

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

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetUpdated

func (x *Status) GetUpdated() bool

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

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

Deprecated: Use TimeUUID.ProtoReflect.Descriptor instead.

func (*TimeUUID) GetLeastSigBits

func (x *TimeUUID) GetLeastSigBits() int64

func (*TimeUUID) GetMostSigBits

func (x *TimeUUID) GetMostSigBits() int64

func (*TimeUUID) ProtoMessage

func (*TimeUUID) ProtoMessage()

func (*TimeUUID) ProtoReflect

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

func (*TimeUUID) Reset

func (x *TimeUUID) Reset()

func (*TimeUUID) String

func (x *TimeUUID) String() string

type UnimplementedKeyValueServiceServer

type UnimplementedKeyValueServiceServer struct {
}

UnimplementedKeyValueServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedKeyValueServiceServer) Get

func (*UnimplementedKeyValueServiceServer) GetRange

func (*UnimplementedKeyValueServiceServer) GetRecent

func (*UnimplementedKeyValueServiceServer) GetRegion

func (*UnimplementedKeyValueServiceServer) GetRow

func (*UnimplementedKeyValueServiceServer) GetSpace

func (*UnimplementedKeyValueServiceServer) Put

func (*UnimplementedKeyValueServiceServer) Remove

func (*UnimplementedKeyValueServiceServer) Scan

func (*UnimplementedKeyValueServiceServer) Touch

Jump to

Keyboard shortcuts

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