Documentation
¶
Index ¶
- Variables
- type DeleteIndexEntry
- func (*DeleteIndexEntry) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteIndexEntry) GetDeletedBytes() int64
- func (x *DeleteIndexEntry) GetDeletedEntries() int64
- func (*DeleteIndexEntry) ProtoMessage()
- func (x *DeleteIndexEntry) ProtoReflect() protoreflect.Message
- func (x *DeleteIndexEntry) Reset()
- func (x *DeleteIndexEntry) String() string
- type MetaOp
- type SyncEntry
- type ValueMessage
- func (*ValueMessage) Descriptor() ([]byte, []int)deprecated
- func (x *ValueMessage) GetCasExpectedVersion() uint64
- func (x *ValueMessage) GetChecksum() uint32
- func (x *ValueMessage) GetData() []byte
- func (x *ValueMessage) GetExpiry() int64
- func (x *ValueMessage) GetOpType() MetaOp
- func (x *ValueMessage) GetRawFilePath() string
- func (x *ValueMessage) GetSegmentOffset() int64
- func (x *ValueMessage) GetSegmentPath() string
- func (x *ValueMessage) GetValueLength() int64
- func (x *ValueMessage) GetValueType() ValueType
- func (x *ValueMessage) GetVersion() uint64
- func (*ValueMessage) ProtoMessage()
- func (x *ValueMessage) ProtoReflect() protoreflect.Message
- func (x *ValueMessage) Reset()
- func (x *ValueMessage) String() string
- type ValueType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ValueType_name = map[int32]string{ 0: "INLINE", 1: "RAW_FILE", 2: "SEGMENT", } ValueType_value = map[string]int32{ "INLINE": 0, "RAW_FILE": 1, "SEGMENT": 2, } )
Enum value maps for ValueType.
View Source
var ( MetaOp_name = map[int32]string{ 0: "META_OP_NONE", 1: "META_OP_CAS_PUT", 2: "META_OP_CAS_DELETE", } MetaOp_value = map[string]int32{ "META_OP_NONE": 0, "META_OP_CAS_PUT": 1, "META_OP_CAS_DELETE": 2, } )
Enum value maps for MetaOp.
View Source
var File_storage_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DeleteIndexEntry ¶
type DeleteIndexEntry struct {
DeletedEntries int64 `protobuf:"varint,1,opt,name=deleted_entries,json=deletedEntries,proto3" json:"deleted_entries,omitempty"` // Number of deleted entries in this segment
DeletedBytes int64 `protobuf:"varint,2,opt,name=deleted_bytes,json=deletedBytes,proto3" json:"deleted_bytes,omitempty"` // Total bytes of deleted entries in this segment
// contains filtered or unexported fields
}
DeleteIndexEntry tracks deleted entries in a segment for garbage collection
func (*DeleteIndexEntry) Descriptor
deprecated
func (*DeleteIndexEntry) Descriptor() ([]byte, []int)
Deprecated: Use DeleteIndexEntry.ProtoReflect.Descriptor instead.
func (*DeleteIndexEntry) GetDeletedBytes ¶
func (x *DeleteIndexEntry) GetDeletedBytes() int64
func (*DeleteIndexEntry) GetDeletedEntries ¶
func (x *DeleteIndexEntry) GetDeletedEntries() int64
func (*DeleteIndexEntry) ProtoMessage ¶
func (*DeleteIndexEntry) ProtoMessage()
func (*DeleteIndexEntry) ProtoReflect ¶
func (x *DeleteIndexEntry) ProtoReflect() protoreflect.Message
func (*DeleteIndexEntry) Reset ¶
func (x *DeleteIndexEntry) Reset()
func (*DeleteIndexEntry) String ¶
func (x *DeleteIndexEntry) String() string
type MetaOp ¶ added in v1.12.0
type MetaOp int32
MetaOp discriminates merge-operand kinds on metadata keys. The zero value keeps every stored value and every pre-existing operand (the compactor's path-preconditioned rewrites) well-formed with no migration.
func (MetaOp) Descriptor ¶ added in v1.12.0
func (MetaOp) Descriptor() protoreflect.EnumDescriptor
func (MetaOp) EnumDescriptor
deprecated
added in
v1.12.0
func (MetaOp) Number ¶ added in v1.12.0
func (x MetaOp) Number() protoreflect.EnumNumber
func (MetaOp) Type ¶ added in v1.12.0
func (MetaOp) Type() protoreflect.EnumType
type SyncEntry ¶
type SyncEntry struct {
MetadataKey string `protobuf:"bytes,1,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` // Key to fetch metadata for validation
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Unix timestamp when file was written
// contains filtered or unexported fields
}
SyncEntry tracks a file pending sync in the sync index
func (*SyncEntry) Descriptor
deprecated
func (*SyncEntry) GetMetadataKey ¶
func (*SyncEntry) GetTimestamp ¶
func (*SyncEntry) ProtoMessage ¶
func (*SyncEntry) ProtoMessage()
func (*SyncEntry) ProtoReflect ¶
func (x *SyncEntry) ProtoReflect() protoreflect.Message
type ValueMessage ¶
type ValueMessage struct {
ValueType ValueType `protobuf:"varint,1,opt,name=value_type,json=valueType,proto3,enum=storage.ValueType" json:"value_type,omitempty"` // Location of the value bytes
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // The actual value bytes
Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"` // Expiry timestamp (unix seconds), 0 if no expiry
// raw_file_path: path to the external raw file storing the value.
//
// Invariant for STORED values:
// - Non-empty iff value_type == RAW_FILE.
// - Always empty for INLINE and SEGMENT.
//
// Overload for MERGE OPERANDS:
// - On a SEGMENT-typed merge operand written by the background
// compactor, raw_file_path carries the CAS precondition (the
// raw-file path the compactor observed when it began migrating
// this entry). The merge operator (mergeMetadataCAS) compares it
// against the current base's raw_file_path to decide whether to
// apply the rewrite, and clears it before persisting the result.
// This overload is confined to transient merge operands — stored
// SEGMENT values never carry raw_file_path.
RawFilePath string `protobuf:"bytes,4,opt,name=raw_file_path,json=rawFilePath,proto3" json:"raw_file_path,omitempty"`
SegmentPath string `protobuf:"bytes,5,opt,name=segment_path,json=segmentPath,proto3" json:"segment_path,omitempty"` // Optional: segment file storing the value for large objects (if used)
SegmentOffset int64 `protobuf:"varint,6,opt,name=segment_offset,json=segmentOffset,proto3" json:"segment_offset,omitempty"` // Byte offset within the segment where the value starts
ValueLength int64 `protobuf:"varint,7,opt,name=value_length,json=valueLength,proto3" json:"value_length,omitempty"` // Length of the value in bytes within the segment
Checksum uint32 `protobuf:"varint,8,opt,name=checksum,proto3" json:"checksum,omitempty"` // CRC32 checksum of the value
// version: owner-assigned monotonic stamp, set on every successful write
// (issue #254). 0 on entries written by pre-versioning binaries; the API
// reports those as the legacy sentinel (merge.VersionLegacy) so 0 can keep
// meaning "absent" in CAS preconditions. Compaction/recompaction copy this
// field unchanged: storage migration is not a write.
Version uint64 `protobuf:"varint,9,opt,name=version,proto3" json:"version,omitempty"`
// op_type / cas_expected_version: MERGE-OPERAND-ONLY fields (always zero on
// stored values, like raw_file_path on stored SEGMENT values). A CAS operand
// carries the full new value plus op_type and the expected version; the
// merge operator (mergeMetadataCAS) resolves it against the base
// deterministically and strips these fields from the persisted result.
OpType MetaOp `protobuf:"varint,10,opt,name=op_type,json=opType,proto3,enum=storage.MetaOp" json:"op_type,omitempty"`
CasExpectedVersion uint64 `protobuf:"varint,11,opt,name=cas_expected_version,json=casExpectedVersion,proto3" json:"cas_expected_version,omitempty"`
// contains filtered or unexported fields
}
ValueMessage is a proto-encoded value for storage
func (*ValueMessage) Descriptor
deprecated
func (*ValueMessage) Descriptor() ([]byte, []int)
Deprecated: Use ValueMessage.ProtoReflect.Descriptor instead.
func (*ValueMessage) GetCasExpectedVersion ¶ added in v1.12.0
func (x *ValueMessage) GetCasExpectedVersion() uint64
func (*ValueMessage) GetChecksum ¶
func (x *ValueMessage) GetChecksum() uint32
func (*ValueMessage) GetData ¶
func (x *ValueMessage) GetData() []byte
func (*ValueMessage) GetExpiry ¶
func (x *ValueMessage) GetExpiry() int64
func (*ValueMessage) GetOpType ¶ added in v1.12.0
func (x *ValueMessage) GetOpType() MetaOp
func (*ValueMessage) GetRawFilePath ¶
func (x *ValueMessage) GetRawFilePath() string
func (*ValueMessage) GetSegmentOffset ¶
func (x *ValueMessage) GetSegmentOffset() int64
func (*ValueMessage) GetSegmentPath ¶
func (x *ValueMessage) GetSegmentPath() string
func (*ValueMessage) GetValueLength ¶
func (x *ValueMessage) GetValueLength() int64
func (*ValueMessage) GetValueType ¶
func (x *ValueMessage) GetValueType() ValueType
func (*ValueMessage) GetVersion ¶ added in v1.12.0
func (x *ValueMessage) GetVersion() uint64
func (*ValueMessage) ProtoMessage ¶
func (*ValueMessage) ProtoMessage()
func (*ValueMessage) ProtoReflect ¶
func (x *ValueMessage) ProtoReflect() protoreflect.Message
func (*ValueMessage) Reset ¶
func (x *ValueMessage) Reset()
func (*ValueMessage) String ¶
func (x *ValueMessage) String() string
type ValueType ¶
type ValueType int32
ValueType indicates where the value bytes are stored.
func (ValueType) Descriptor ¶
func (ValueType) Descriptor() protoreflect.EnumDescriptor
func (ValueType) EnumDescriptor
deprecated
func (ValueType) Number ¶
func (x ValueType) Number() protoreflect.EnumNumber
func (ValueType) Type ¶
func (ValueType) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.