Help us shape the future of Go! Take the 2026 Go Developer Survey

proto

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 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 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 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
	// 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) GetChecksum

func (x *ValueMessage) GetChecksum() uint32

func (*ValueMessage) GetData

func (x *ValueMessage) GetData() []byte

func (*ValueMessage) GetExpiry

func (x *ValueMessage) GetExpiry() int64

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