proto

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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.

const (
	MetaOp_META_OP_NONE       MetaOp = 0 // plain value / legacy operand
	MetaOp_META_OP_CAS_PUT    MetaOp = 1 // apply operand iff base version matches cas_expected_version
	MetaOp_META_OP_CAS_DELETE MetaOp = 2 // tombstone base iff its version matches cas_expected_version
)

func (MetaOp) Descriptor added in v1.12.0

func (MetaOp) Descriptor() protoreflect.EnumDescriptor

func (MetaOp) Enum added in v1.12.0

func (x MetaOp) Enum() *MetaOp

func (MetaOp) EnumDescriptor deprecated added in v1.12.0

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

Deprecated: Use MetaOp.Descriptor instead.

func (MetaOp) Number added in v1.12.0

func (x MetaOp) Number() protoreflect.EnumNumber

func (MetaOp) String added in v1.12.0

func (x MetaOp) String() string

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

Deprecated: Use SyncEntry.ProtoReflect.Descriptor instead.

func (*SyncEntry) GetMetadataKey

func (x *SyncEntry) GetMetadataKey() string

func (*SyncEntry) GetTimestamp

func (x *SyncEntry) GetTimestamp() int64

func (*SyncEntry) ProtoMessage

func (*SyncEntry) ProtoMessage()

func (*SyncEntry) ProtoReflect

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

func (*SyncEntry) Reset

func (x *SyncEntry) Reset()

func (*SyncEntry) String

func (x *SyncEntry) String() string

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.

const (
	ValueType_INLINE   ValueType = 0 // Value is stored directly in the `data` field.
	ValueType_RAW_FILE ValueType = 1 // Value is stored in an external raw file referenced by `raw_file_path`.
	ValueType_SEGMENT  ValueType = 2 // Value is stored inside a segment file referenced by `segment_path`.
)

func (ValueType) Descriptor

func (ValueType) Descriptor() protoreflect.EnumDescriptor

func (ValueType) Enum

func (x ValueType) Enum() *ValueType

func (ValueType) EnumDescriptor deprecated

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

Deprecated: Use ValueType.Descriptor instead.

func (ValueType) Number

func (x ValueType) Number() protoreflect.EnumNumber

func (ValueType) String

func (x ValueType) String() string

func (ValueType) Type

Jump to

Keyboard shortcuts

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