Documentation
¶
Index ¶
- Constants
- Variables
- type Backend
- type BlockStore
- func (s *BlockStore) BeginReadOperation(ctx context.Context) (block.StoreOps, func(), error)
- func (s *BlockStore) Close() error
- func (s *BlockStore) GetBlock(ctx context.Context, ref *block.BlockRef) ([]byte, bool, error)
- func (s *BlockStore) GetBlockExists(ctx context.Context, ref *block.BlockRef) (bool, error)
- func (s *BlockStore) GetBlockExistsBatch(ctx context.Context, refs []*block.BlockRef) ([]bool, error)
- func (s *BlockStore) GetHashType() hash.HashType
- func (s *BlockStore) GetStoredBlock(ctx context.Context, ref *block.BlockRef) (*block.StoredBlock, error)
- func (s *BlockStore) GetSupportedFeatures() block.StoreFeature
- func (s *BlockStore) PutBlock(ctx context.Context, data []byte, opts *block.PutOpts) (*block.BlockRef, bool, error)
- func (s *BlockStore) PutBlockBatch(ctx context.Context, entries []*block.PutBatchEntry) error
- func (s *BlockStore) RmBlock(ctx context.Context, ref *block.BlockRef) error
- func (s *BlockStore) StatBlock(ctx context.Context, ref *block.BlockRef) (*block.BlockStat, error)
- func (s *BlockStore) Sync(ctx context.Context) (bool, error)
- type Catalogue
- func (m *Catalogue) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Catalogue) CloneVT() *Catalogue
- func (this *Catalogue) EqualMessageVT(thatMsg any) bool
- func (this *Catalogue) EqualVT(that *Catalogue) bool
- func (x *Catalogue) GetChildren() []*Child
- func (x *Catalogue) GetPartitions() []*Partition
- func (x *Catalogue) MarshalJSON() ([]byte, error)
- func (x *Catalogue) MarshalProtoJSON(s *json.MarshalState)
- func (x *Catalogue) MarshalProtoText() string
- func (m *Catalogue) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Catalogue) MarshalToVT(dAtA []byte) (int, error)
- func (m *Catalogue) MarshalVT() (dAtA []byte, err error)
- func (*Catalogue) ProtoMessage()
- func (x *Catalogue) Reset()
- func (m *Catalogue) SizeVT() (n int)
- func (x *Catalogue) String() string
- func (x *Catalogue) UnmarshalJSON(b []byte) error
- func (x *Catalogue) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Catalogue) UnmarshalVT(dAtA []byte) error
- type Child
- func (m *Child) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Child) CloneVT() *Child
- func (this *Child) EqualMessageVT(thatMsg any) bool
- func (this *Child) EqualVT(that *Child) bool
- func (x *Child) GetFile() string
- func (x *Child) GetLower() []byte
- func (x *Child) MarshalJSON() ([]byte, error)
- func (x *Child) MarshalProtoJSON(s *json.MarshalState)
- func (x *Child) MarshalProtoText() string
- func (m *Child) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Child) MarshalToVT(dAtA []byte) (int, error)
- func (m *Child) MarshalVT() (dAtA []byte, err error)
- func (*Child) ProtoMessage()
- func (x *Child) Reset()
- func (m *Child) SizeVT() (n int)
- func (x *Child) String() string
- func (x *Child) UnmarshalJSON(b []byte) error
- func (x *Child) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Child) UnmarshalVT(dAtA []byte) error
- type Edge
- func (m *Edge) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Edge) CloneVT() *Edge
- func (this *Edge) EqualMessageVT(thatMsg any) bool
- func (this *Edge) EqualVT(that *Edge) bool
- func (x *Edge) GetObject() string
- func (x *Edge) GetSubject() string
- func (x *Edge) MarshalJSON() ([]byte, error)
- func (x *Edge) MarshalProtoJSON(s *json.MarshalState)
- func (x *Edge) MarshalProtoText() string
- func (m *Edge) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Edge) MarshalToVT(dAtA []byte) (int, error)
- func (m *Edge) MarshalVT() (dAtA []byte, err error)
- func (*Edge) ProtoMessage()
- func (x *Edge) Reset()
- func (m *Edge) SizeVT() (n int)
- func (x *Edge) String() string
- func (x *Edge) UnmarshalJSON(b []byte) error
- func (x *Edge) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Edge) UnmarshalVT(dAtA []byte) error
- type Engine
- func (e *Engine) AcquireSTW(ctx context.Context) (func(), error)
- func (e *Engine) Append(ctx context.Context, adds, removes []block_gc.RefEdge) error
- func (e *Engine) Apply(ctx context.Context, records []*Record) error
- func (e *Engine) BlockStats(ctx context.Context) (uint64, uint64, error)
- func (e *Engine) CleanPack(ctx context.Context) (bool, error)
- func (e *Engine) Close() error
- func (e *Engine) Execute(ctx context.Context) error
- func (e *Engine) Get(ctx context.Context, key []byte) ([]byte, bool, uint64, error)
- func (e *Engine) GetPendingOutgoingRefs(ctx context.Context, node string) ([]string, error)
- func (e *Engine) Maintenance(ctx context.Context) error
- func (e *Engine) MetadataStore() kvtx.Store
- func (e *Engine) NewTransaction(ctx context.Context, write bool) (kvtx.Tx, error)
- func (e *Engine) Reclaim(ctx context.Context) (bool, error)
- func (e *Engine) RefreshGenerationContext(ctx context.Context) (uint64, error)
- func (e *Engine) ReplayWAL(ctx context.Context, graph block_gc.CollectorGraph) (count int, err error)
- func (e *Engine) WaitGeneration(ctx context.Context, after uint64) (uint64, error)
- type Files
- func (m *Files) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Files) CloneVT() *Files
- func (this *Files) EqualMessageVT(thatMsg any) bool
- func (this *Files) EqualVT(that *Files) bool
- func (x *Files) GetNames() []string
- func (x *Files) GetPublication() string
- func (x *Files) MarshalJSON() ([]byte, error)
- func (x *Files) MarshalProtoJSON(s *json.MarshalState)
- func (x *Files) MarshalProtoText() string
- func (m *Files) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Files) MarshalToVT(dAtA []byte) (int, error)
- func (m *Files) MarshalVT() (dAtA []byte, err error)
- func (*Files) ProtoMessage()
- func (x *Files) Reset()
- func (m *Files) SizeVT() (n int)
- func (x *Files) String() string
- func (x *Files) UnmarshalJSON(b []byte) error
- func (x *Files) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Files) UnmarshalVT(dAtA []byte) error
- type JournalEntry
- func (m *JournalEntry) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *JournalEntry) CloneVT() *JournalEntry
- func (this *JournalEntry) EqualMessageVT(thatMsg any) bool
- func (this *JournalEntry) EqualVT(that *JournalEntry) bool
- func (x *JournalEntry) GetAdds() []*Edge
- func (x *JournalEntry) GetRemoves() []*Edge
- func (x *JournalEntry) MarshalJSON() ([]byte, error)
- func (x *JournalEntry) MarshalProtoJSON(s *json.MarshalState)
- func (x *JournalEntry) MarshalProtoText() string
- func (m *JournalEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *JournalEntry) MarshalToVT(dAtA []byte) (int, error)
- func (m *JournalEntry) MarshalVT() (dAtA []byte, err error)
- func (*JournalEntry) ProtoMessage()
- func (x *JournalEntry) Reset()
- func (m *JournalEntry) SizeVT() (n int)
- func (x *JournalEntry) String() string
- func (x *JournalEntry) UnmarshalJSON(b []byte) error
- func (x *JournalEntry) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *JournalEntry) UnmarshalVT(dAtA []byte) error
- type Location
- func (m *Location) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Location) CloneVT() *Location
- func (this *Location) EqualMessageVT(thatMsg any) bool
- func (this *Location) EqualVT(that *Location) bool
- func (x *Location) GetChecksum() uint32
- func (x *Location) GetLength() uint32
- func (x *Location) GetOffset() uint64
- func (x *Location) GetPack() string
- func (x *Location) GetPackBytes() uint32
- func (x *Location) MarshalJSON() ([]byte, error)
- func (x *Location) MarshalProtoJSON(s *json.MarshalState)
- func (x *Location) MarshalProtoText() string
- func (m *Location) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Location) MarshalToVT(dAtA []byte) (int, error)
- func (m *Location) MarshalVT() (dAtA []byte, err error)
- func (*Location) ProtoMessage()
- func (x *Location) Reset()
- func (m *Location) SizeVT() (n int)
- func (x *Location) String() string
- func (x *Location) UnmarshalJSON(b []byte) error
- func (x *Location) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Location) UnmarshalVT(dAtA []byte) error
- type Pack
- func (m *Pack) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Pack) CloneVT() *Pack
- func (this *Pack) EqualMessageVT(thatMsg any) bool
- func (this *Pack) EqualVT(that *Pack) bool
- func (x *Pack) GetCleanupKey() []byte
- func (x *Pack) GetLiveBytes() uint64
- func (x *Pack) GetRecords() []*Record
- func (x *Pack) MarshalJSON() ([]byte, error)
- func (x *Pack) MarshalProtoJSON(s *json.MarshalState)
- func (x *Pack) MarshalProtoText() string
- func (m *Pack) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Pack) MarshalToVT(dAtA []byte) (int, error)
- func (m *Pack) MarshalVT() (dAtA []byte, err error)
- func (*Pack) ProtoMessage()
- func (x *Pack) Reset()
- func (m *Pack) SizeVT() (n int)
- func (x *Pack) String() string
- func (x *Pack) UnmarshalJSON(b []byte) error
- func (x *Pack) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Pack) UnmarshalVT(dAtA []byte) error
- type Partition
- func (m *Partition) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Partition) CloneVT() *Partition
- func (this *Partition) EqualMessageVT(thatMsg any) bool
- func (this *Partition) EqualVT(that *Partition) bool
- func (x *Partition) GetLower() []byte
- func (x *Partition) GetRuns() []*RunFile
- func (x *Partition) MarshalJSON() ([]byte, error)
- func (x *Partition) MarshalProtoJSON(s *json.MarshalState)
- func (x *Partition) MarshalProtoText() string
- func (m *Partition) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Partition) MarshalToVT(dAtA []byte) (int, error)
- func (m *Partition) MarshalVT() (dAtA []byte, err error)
- func (*Partition) ProtoMessage()
- func (x *Partition) Reset()
- func (m *Partition) SizeVT() (n int)
- func (x *Partition) String() string
- func (x *Partition) UnmarshalJSON(b []byte) error
- func (x *Partition) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Partition) UnmarshalVT(dAtA []byte) error
- type Record
- func (m *Record) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Record) CloneVT() *Record
- func (this *Record) EqualMessageVT(thatMsg any) bool
- func (this *Record) EqualVT(that *Record) bool
- func (x *Record) GetDeleted() bool
- func (x *Record) GetKey() []byte
- func (x *Record) GetValue() []byte
- func (x *Record) MarshalJSON() ([]byte, error)
- func (x *Record) MarshalProtoJSON(s *json.MarshalState)
- func (x *Record) MarshalProtoText() string
- func (m *Record) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Record) MarshalToVT(dAtA []byte) (int, error)
- func (m *Record) MarshalVT() (dAtA []byte, err error)
- func (*Record) ProtoMessage()
- func (x *Record) Reset()
- func (m *Record) SizeVT() (n int)
- func (x *Record) String() string
- func (x *Record) UnmarshalJSON(b []byte) error
- func (x *Record) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Record) UnmarshalVT(dAtA []byte) error
- type ReplayTarget
- type Root
- func (m *Root) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Root) CloneVT() *Root
- func (this *Root) EqualMessageVT(thatMsg any) bool
- func (this *Root) EqualVT(that *Root) bool
- func (x *Root) GetBlockBytes() uint64
- func (x *Root) GetBlockCount() uint64
- func (x *Root) GetCatalogue() string
- func (x *Root) GetFormat() uint32
- func (x *Root) GetGeneration() uint64
- func (x *Root) GetJournalSequence() uint64
- func (x *Root) GetPublication() string
- func (x *Root) GetReclaimNext() uint64
- func (x *Root) GetRetireThrough() uint64
- func (x *Root) GetRevision() uint64
- func (x *Root) MarshalJSON() ([]byte, error)
- func (x *Root) MarshalProtoJSON(s *json.MarshalState)
- func (x *Root) MarshalProtoText() string
- func (m *Root) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Root) MarshalToVT(dAtA []byte) (int, error)
- func (m *Root) MarshalVT() (dAtA []byte, err error)
- func (*Root) ProtoMessage()
- func (x *Root) Reset()
- func (m *Root) SizeVT() (n int)
- func (x *Root) String() string
- func (x *Root) UnmarshalJSON(b []byte) error
- func (x *Root) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Root) UnmarshalVT(dAtA []byte) error
- type Run
- func (m *Run) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Run) CloneVT() *Run
- func (this *Run) EqualMessageVT(thatMsg any) bool
- func (this *Run) EqualVT(that *Run) bool
- func (x *Run) GetRecords() []*Record
- func (x *Run) MarshalJSON() ([]byte, error)
- func (x *Run) MarshalProtoJSON(s *json.MarshalState)
- func (x *Run) MarshalProtoText() string
- func (m *Run) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Run) MarshalToVT(dAtA []byte) (int, error)
- func (m *Run) MarshalVT() (dAtA []byte, err error)
- func (*Run) ProtoMessage()
- func (x *Run) Reset()
- func (m *Run) SizeVT() (n int)
- func (x *Run) String() string
- func (x *Run) UnmarshalJSON(b []byte) error
- func (x *Run) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Run) UnmarshalVT(dAtA []byte) error
- type RunFile
- func (m *RunFile) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *RunFile) CloneVT() *RunFile
- func (this *RunFile) EqualMessageVT(thatMsg any) bool
- func (this *RunFile) EqualVT(that *RunFile) bool
- func (x *RunFile) GetBytes() uint32
- func (x *RunFile) GetDeleted() uint32
- func (x *RunFile) GetName() string
- func (x *RunFile) GetRecords() uint32
- func (x *RunFile) MarshalJSON() ([]byte, error)
- func (x *RunFile) MarshalProtoJSON(s *json.MarshalState)
- func (x *RunFile) MarshalProtoText() string
- func (m *RunFile) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *RunFile) MarshalToVT(dAtA []byte) (int, error)
- func (m *RunFile) MarshalVT() (dAtA []byte, err error)
- func (*RunFile) ProtoMessage()
- func (x *RunFile) Reset()
- func (m *RunFile) SizeVT() (n int)
- func (x *RunFile) String() string
- func (x *RunFile) UnmarshalJSON(b []byte) error
- func (x *RunFile) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *RunFile) UnmarshalVT(dAtA []byte) error
Constants ¶
const ( // FormatVersion identifies the immutable volume format. The volume runtime // frames each root with it, so a root written in another format opens as a // replacement instead of failing as corrupt. FormatVersion = 4 // MaxValueBytes preserves the supported maximum block and metadata value. MaxValueBytes = 2 << 20 )
Variables ¶
var ( // ErrCorrupt reports an invalid committed file without resetting data. ErrCorrupt = errors.New("invalid immutable volume file") // ErrLimit reports an input exceeding a documented engine bound. ErrLimit = errors.New("immutable volume input exceeds limit") // ErrClosed reports work attempted after engine shutdown. ErrClosed = errors.New("immutable volume is closed") )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
// Read returns an owned bounded range, or a complete file when length is readAll.
Read(ctx context.Context, name string, offset int64, length int) ([]byte, error)
// Write acknowledges durable replacement; interrupted first creation may leave an empty entry.
Write(ctx context.Context, name string, data []byte) error
// Remove deletes a file and succeeds when it is already absent.
Remove(ctx context.Context, name string) error
// Lock holds origin-wide shared or exclusive access until its release is called.
Lock(ctx context.Context, name string, exclusive bool) (func(), error)
// Subscribe registers a lossy publication hint; its release closes resources.
Subscribe() (<-chan struct{}, func())
// Notify announces a durable generation without affecting commit success.
Notify(generation uint64)
// Close releases instance-local notification resources.
Close() error
}
Backend provides immutable files, atomic whole-file replacement, and locks. Lock names are local to one volume and shared by all of its runtime instances. Read returns io/fs.ErrNotExist for missing files. Write acknowledges only after durable whole-file publication. Remove is idempotent.
type BlockStore ¶
type BlockStore struct {
// contains filtered or unexported fields
}
BlockStore owns bounded local write admission and its durable pack store. A successful Sync covers every write admitted before that fence began.
func NewBlockStore ¶
NewBlockStore starts bounded writeback and quiescent maintenance for a volume.
func (*BlockStore) BeginReadOperation ¶
BeginReadOperation pins durable files and retains local pending read-through.
func (*BlockStore) Close ¶
func (s *BlockStore) Close() error
Close cancels admission, joins writeback, and releases uncommitted local data.
func (*BlockStore) GetBlock ¶
GetBlock reads admitted content before consulting durable immutable packs.
func (*BlockStore) GetBlockExists ¶
GetBlockExists answers from pending state or the small location index.
func (*BlockStore) GetBlockExistsBatch ¶
func (s *BlockStore) GetBlockExistsBatch(ctx context.Context, refs []*block.BlockRef) ([]bool, error)
GetBlockExistsBatch shares one immutable generation for uncached references.
func (*BlockStore) GetHashType ¶
func (s *BlockStore) GetHashType() hash.HashType
GetHashType returns the configured preferred hash without storage work.
func (*BlockStore) GetStoredBlock ¶
func (s *BlockStore) GetStoredBlock(ctx context.Context, ref *block.BlockRef) (*block.StoredBlock, error)
GetStoredBlock serves the block without refs because this store keeps block bytes without their refs.
func (*BlockStore) GetSupportedFeatures ¶
func (s *BlockStore) GetSupportedFeatures() block.StoreFeature
GetSupportedFeatures prevents redundant buffering above this volume.
func (*BlockStore) PutBlock ¶
func (s *BlockStore) PutBlock(ctx context.Context, data []byte, opts *block.PutOpts) (*block.BlockRef, bool, error)
PutBlock admits verified content and optionally completes its durability fence.
func (*BlockStore) PutBlockBatch ¶
func (s *BlockStore) PutBlockBatch(ctx context.Context, entries []*block.PutBatchEntry) error
PutBlockBatch validates supplied identities and admits the bounded local writes.
func (*BlockStore) RmBlock ¶
RmBlock orders deletion after prior local writes and durably records its extent.
type Catalogue ¶
type Catalogue struct {
// Children route ordered key ranges when this is a branch page.
Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"`
// Partitions route ordered run ranges when this is a leaf page.
Partitions []*Partition `protobuf:"bytes,2,rep,name=partitions,proto3" json:"partitions,omitempty"`
// contains filtered or unexported fields
}
Catalogue contains either ordered children or ordered run partitions.
func (*Catalogue) CloneMessageVT ¶
func (m *Catalogue) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Catalogue) EqualMessageVT ¶
func (*Catalogue) GetChildren ¶
func (*Catalogue) GetPartitions ¶
func (*Catalogue) MarshalJSON ¶
MarshalJSON marshals the Catalogue to JSON.
func (*Catalogue) MarshalProtoJSON ¶
func (x *Catalogue) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Catalogue message to JSON.
func (*Catalogue) MarshalProtoText ¶
func (*Catalogue) MarshalToSizedBufferVT ¶
func (*Catalogue) ProtoMessage ¶
func (*Catalogue) ProtoMessage()
func (*Catalogue) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Catalogue from JSON.
func (*Catalogue) UnmarshalProtoJSON ¶
func (x *Catalogue) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Catalogue message from JSON.
func (*Catalogue) UnmarshalVT ¶
type Child ¶
type Child struct {
// Lower is the inclusive lower key bound of this range.
Lower []byte `protobuf:"bytes,1,opt,name=lower,proto3" json:"lower,omitempty"`
// File names the immutable child catalogue page.
File string `protobuf:"bytes,2,opt,name=file,proto3" json:"file,omitempty"`
// contains filtered or unexported fields
}
Child routes keys beginning at lower to an immutable catalogue page.
func (*Child) CloneMessageVT ¶
func (m *Child) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Child) EqualMessageVT ¶
func (*Child) MarshalJSON ¶
MarshalJSON marshals the Child to JSON.
func (*Child) MarshalProtoJSON ¶
func (x *Child) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Child message to JSON.
func (*Child) MarshalProtoText ¶
func (*Child) MarshalToSizedBufferVT ¶
func (*Child) ProtoMessage ¶
func (*Child) ProtoMessage()
func (*Child) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Child from JSON.
func (*Child) UnmarshalProtoJSON ¶
func (x *Child) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Child message from JSON.
func (*Child) UnmarshalVT ¶
type Edge ¶
type Edge struct {
// Subject is the complete source node identity.
Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
// Object is the complete target node identity.
Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
// contains filtered or unexported fields
}
Edge records complete source and target identities in the GC journal.
func (*Edge) CloneMessageVT ¶
func (m *Edge) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Edge) EqualMessageVT ¶
func (*Edge) GetSubject ¶
func (*Edge) MarshalJSON ¶
MarshalJSON marshals the Edge to JSON.
func (*Edge) MarshalProtoJSON ¶
func (x *Edge) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Edge message to JSON.
func (*Edge) MarshalProtoText ¶
func (*Edge) MarshalToSizedBufferVT ¶
func (*Edge) ProtoMessage ¶
func (*Edge) ProtoMessage()
func (*Edge) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Edge from JSON.
func (*Edge) UnmarshalProtoJSON ¶
func (x *Edge) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Edge message from JSON.
func (*Edge) UnmarshalVT ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine owns one volume's durable publication, immutable reads, and cache. Instances coordinate through Backend locks; cached files never prove freshness.
func (*Engine) AcquireSTW ¶
AcquireSTW excludes new journal appends during the collector's final sweep.
func (*Engine) Append ¶
Append durably journals one ownership transition while sharing the GC barrier. Sequence allocation and the journal record publish in the same engine root.
func (*Engine) BlockStats ¶
BlockStats returns committed block count and live payload bytes.
func (*Engine) CleanPack ¶
CleanPack relocates one oldest dirty pack and atomically advances its queue. Preparation does not hold the publication lock; each copied location is compared again before it can replace a current index entry.
func (*Engine) Execute ¶
Execute satisfies the durable volume store lifecycle; writes are synchronous.
func (*Engine) GetPendingOutgoingRefs ¶
GetPendingOutgoingRefs scans the unreplayed journal in one snapshot for edges from node. Journal order applies each removal after earlier additions.
func (*Engine) Maintenance ¶
Maintenance performs one bounded relocation and retirement quantum.
func (*Engine) MetadataStore ¶
MetadataStore exposes the public metadata namespace. Transactions validate only the ranges they read, so block and GC writes never invalidate them.
func (*Engine) NewTransaction ¶
NewTransaction opens a lazy generation-consistent transaction.
func (*Engine) Reclaim ¶
Reclaim deletes a bounded batch of retired files, then checkpoints once. It never waits for readers while holding the publication lock.
func (*Engine) RefreshGenerationContext ¶
RefreshGenerationContext reads the durable generation under file protection.
func (*Engine) ReplayWAL ¶
func (e *Engine) ReplayWAL(ctx context.Context, graph block_gc.CollectorGraph) (count int, err error)
ReplayWAL serializes ordered replay and removes each entry only after application. Repeating an entry after interruption is safe because graph updates are idempotent.
func (*Engine) WaitGeneration ¶
WaitGeneration waits for a durable generation newer than after. Broadcast hints only schedule reads. The bounded fallback recovers messages lost while a browser tab is suspended or its notification channel is absent.
type Files ¶
type Files struct {
// Names lists the bounded immutable files owned by this publication.
Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
// Publication matches the committed root or its recoverable intent.
Publication string `protobuf:"bytes,2,opt,name=publication,proto3" json:"publication,omitempty"`
// contains filtered or unexported fields
}
Files records a bounded publication's allocated or retired immutable files.
func (*Files) CloneMessageVT ¶
func (m *Files) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Files) EqualMessageVT ¶
func (*Files) GetPublication ¶
func (*Files) MarshalJSON ¶
MarshalJSON marshals the Files to JSON.
func (*Files) MarshalProtoJSON ¶
func (x *Files) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Files message to JSON.
func (*Files) MarshalProtoText ¶
func (*Files) MarshalToSizedBufferVT ¶
func (*Files) ProtoMessage ¶
func (*Files) ProtoMessage()
func (*Files) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Files from JSON.
func (*Files) UnmarshalProtoJSON ¶
func (x *Files) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Files message from JSON.
func (*Files) UnmarshalVT ¶
type JournalEntry ¶
type JournalEntry struct {
// Adds contains ownership edges applied before removals in this entry.
Adds []*Edge `protobuf:"bytes,1,rep,name=adds,proto3" json:"adds,omitempty"`
// Removes contains ownership edges deleted after additions in this entry.
Removes []*Edge `protobuf:"bytes,2,rep,name=removes,proto3" json:"removes,omitempty"`
// contains filtered or unexported fields
}
JournalEntry preserves one ordered GC ownership transition until replay.
func (*JournalEntry) CloneMessageVT ¶
func (m *JournalEntry) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*JournalEntry) CloneVT ¶
func (m *JournalEntry) CloneVT() *JournalEntry
func (*JournalEntry) EqualMessageVT ¶
func (this *JournalEntry) EqualMessageVT(thatMsg any) bool
func (*JournalEntry) EqualVT ¶
func (this *JournalEntry) EqualVT(that *JournalEntry) bool
func (*JournalEntry) GetAdds ¶
func (x *JournalEntry) GetAdds() []*Edge
func (*JournalEntry) GetRemoves ¶
func (x *JournalEntry) GetRemoves() []*Edge
func (*JournalEntry) MarshalJSON ¶
func (x *JournalEntry) MarshalJSON() ([]byte, error)
MarshalJSON marshals the JournalEntry to JSON.
func (*JournalEntry) MarshalProtoJSON ¶
func (x *JournalEntry) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the JournalEntry message to JSON.
func (*JournalEntry) MarshalProtoText ¶
func (x *JournalEntry) MarshalProtoText() string
func (*JournalEntry) MarshalToSizedBufferVT ¶
func (m *JournalEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*JournalEntry) MarshalToVT ¶
func (m *JournalEntry) MarshalToVT(dAtA []byte) (int, error)
func (*JournalEntry) MarshalVT ¶
func (m *JournalEntry) MarshalVT() (dAtA []byte, err error)
func (*JournalEntry) ProtoMessage ¶
func (*JournalEntry) ProtoMessage()
func (*JournalEntry) Reset ¶
func (x *JournalEntry) Reset()
func (*JournalEntry) SizeVT ¶
func (m *JournalEntry) SizeVT() (n int)
func (*JournalEntry) String ¶
func (x *JournalEntry) String() string
func (*JournalEntry) UnmarshalJSON ¶
func (x *JournalEntry) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the JournalEntry from JSON.
func (*JournalEntry) UnmarshalProtoJSON ¶
func (x *JournalEntry) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the JournalEntry message from JSON.
func (*JournalEntry) UnmarshalVT ¶
func (m *JournalEntry) UnmarshalVT(dAtA []byte) error
type Location ¶
type Location struct {
// Pack names the immutable payload file containing this extent.
Pack string `protobuf:"bytes,1,opt,name=pack,proto3" json:"pack,omitempty"`
// Offset is the first payload byte within Pack.
Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
// Length is the number of payload bytes in the extent.
Length uint32 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"`
// Checksum is the IEEE CRC32 of the complete payload extent.
Checksum uint32 `protobuf:"varint,4,opt,name=checksum,proto3" json:"checksum,omitempty"`
// PackBytes is the complete file length, bounding aligned reads at the tail.
PackBytes uint32 `protobuf:"varint,5,opt,name=pack_bytes,json=packBytes,proto3" json:"packBytes,omitempty"`
// contains filtered or unexported fields
}
Location identifies an immutable payload extent and its full-record checksum.
func (*Location) CloneMessageVT ¶
func (m *Location) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Location) EqualMessageVT ¶
func (*Location) GetChecksum ¶
func (*Location) GetPackBytes ¶
func (*Location) MarshalJSON ¶
MarshalJSON marshals the Location to JSON.
func (*Location) MarshalProtoJSON ¶
func (x *Location) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Location message to JSON.
func (*Location) MarshalProtoText ¶
func (*Location) MarshalToSizedBufferVT ¶
func (*Location) ProtoMessage ¶
func (*Location) ProtoMessage()
func (*Location) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Location from JSON.
func (*Location) UnmarshalProtoJSON ¶
func (x *Location) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Location message from JSON.
func (*Location) UnmarshalVT ¶
type Pack ¶
type Pack struct {
// Records preserves complete block identities and locations in payload arrival order.
Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
// LiveBytes counts payload bytes still referenced in this pack.
LiveBytes uint64 `protobuf:"varint,2,opt,name=live_bytes,json=liveBytes,proto3" json:"liveBytes,omitempty"`
// CleanupKey identifies the ordered internal queue entry for this pack.
CleanupKey []byte `protobuf:"bytes,3,opt,name=cleanup_key,json=cleanupKey,proto3" json:"cleanupKey,omitempty"`
// contains filtered or unexported fields
}
Pack records the complete block identities and extents in one payload file.
func (*Pack) CloneMessageVT ¶
func (m *Pack) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Pack) EqualMessageVT ¶
func (*Pack) GetCleanupKey ¶
func (*Pack) GetLiveBytes ¶
func (*Pack) GetRecords ¶
func (*Pack) MarshalJSON ¶
MarshalJSON marshals the Pack to JSON.
func (*Pack) MarshalProtoJSON ¶
func (x *Pack) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Pack message to JSON.
func (*Pack) MarshalProtoText ¶
func (*Pack) MarshalToSizedBufferVT ¶
func (*Pack) ProtoMessage ¶
func (*Pack) ProtoMessage()
func (*Pack) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Pack from JSON.
func (*Pack) UnmarshalProtoJSON ¶
func (x *Pack) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Pack message from JSON.
func (*Pack) UnmarshalVT ¶
type Partition ¶
type Partition struct {
// Lower is the inclusive lower key bound of this range.
Lower []byte `protobuf:"bytes,1,opt,name=lower,proto3" json:"lower,omitempty"`
// Runs lists at most four immutable runs, oldest first.
Runs []*RunFile `protobuf:"bytes,2,rep,name=runs,proto3" json:"runs,omitempty"`
// contains filtered or unexported fields
}
Partition covers keys up to the next partition and bounds overlapping runs.
func (*Partition) CloneMessageVT ¶
func (m *Partition) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Partition) EqualMessageVT ¶
func (*Partition) MarshalJSON ¶
MarshalJSON marshals the Partition to JSON.
func (*Partition) MarshalProtoJSON ¶
func (x *Partition) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Partition message to JSON.
func (*Partition) MarshalProtoText ¶
func (*Partition) MarshalToSizedBufferVT ¶
func (*Partition) ProtoMessage ¶
func (*Partition) ProtoMessage()
func (*Partition) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Partition from JSON.
func (*Partition) UnmarshalProtoJSON ¶
func (x *Partition) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Partition message from JSON.
func (*Partition) UnmarshalVT ¶
type Record ¶
type Record struct {
// Key is the complete binary identity, including its internal namespace.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// Value holds the current encoded value when Deleted is false.
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// Deleted hides older values for this key until run consolidation.
Deleted bool `protobuf:"varint,3,opt,name=deleted,proto3" json:"deleted,omitempty"`
// contains filtered or unexported fields
}
Record is one complete key and its current value or deletion.
func (*Record) CloneMessageVT ¶
func (m *Record) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Record) EqualMessageVT ¶
func (*Record) GetDeleted ¶
func (*Record) MarshalJSON ¶
MarshalJSON marshals the Record to JSON.
func (*Record) MarshalProtoJSON ¶
func (x *Record) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Record message to JSON.
func (*Record) MarshalProtoText ¶
func (*Record) MarshalToSizedBufferVT ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Record from JSON.
func (*Record) UnmarshalProtoJSON ¶
func (x *Record) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Record message from JSON.
func (*Record) UnmarshalVT ¶
type ReplayTarget ¶
type ReplayTarget struct {
*Engine
*BlockStore
}
ReplayTarget drives a format 3 engine and its block store as one workload replay target.
func (ReplayTarget) AppendJournal ¶
AppendJournal journals reference changes through the engine.
func (ReplayTarget) ReplayJournal ¶
func (t ReplayTarget) ReplayJournal(ctx context.Context, apply func(adds, removes []block_gc.RefEdge) error) error
ReplayJournal passes every journaled change to apply through the engine's write-ahead log replay.
type Root ¶
type Root struct {
// Format identifies the immutable layout accepted by this engine.
Format uint32 `protobuf:"varint,1,opt,name=format,proto3" json:"format,omitempty"`
// Generation orders all root publications, including physical maintenance.
Generation uint64 `protobuf:"varint,2,opt,name=generation,proto3" json:"generation,omitempty"`
// Catalogue names the immutable root routing page.
Catalogue string `protobuf:"bytes,3,opt,name=catalogue,proto3" json:"catalogue,omitempty"`
// ReclaimNext is the first retirement generation still requiring examination.
ReclaimNext uint64 `protobuf:"varint,4,opt,name=reclaim_next,json=reclaimNext,proto3" json:"reclaimNext,omitempty"`
// Publication identifies the intent that produced this committed root.
Publication string `protobuf:"bytes,5,opt,name=publication,proto3" json:"publication,omitempty"`
// RetireThrough is the last logical publication with retirement records.
RetireThrough uint64 `protobuf:"varint,6,opt,name=retire_through,json=retireThrough,proto3" json:"retireThrough,omitempty"`
// BlockCount counts live payload locations in the committed index.
BlockCount uint64 `protobuf:"varint,7,opt,name=block_count,json=blockCount,proto3" json:"blockCount,omitempty"`
// BlockBytes sums the lengths of live payload locations.
BlockBytes uint64 `protobuf:"varint,8,opt,name=block_bytes,json=blockBytes,proto3" json:"blockBytes,omitempty"`
// JournalSequence is the last allocated GC journal sequence.
JournalSequence uint64 `protobuf:"varint,9,opt,name=journal_sequence,json=journalSequence,proto3" json:"journalSequence,omitempty"`
// Revision changes for logical writes, not relocation or retirement.
Revision uint64 `protobuf:"varint,10,opt,name=revision,proto3" json:"revision,omitempty"`
// contains filtered or unexported fields
}
Root selects one complete immutable catalogue.
func (*Root) CloneMessageVT ¶
func (m *Root) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Root) EqualMessageVT ¶
func (*Root) GetBlockBytes ¶
func (*Root) GetBlockCount ¶
func (*Root) GetCatalogue ¶
func (*Root) GetGeneration ¶
func (*Root) GetJournalSequence ¶
func (*Root) GetPublication ¶
func (*Root) GetReclaimNext ¶
func (*Root) GetRetireThrough ¶
func (*Root) GetRevision ¶
func (*Root) MarshalJSON ¶
MarshalJSON marshals the Root to JSON.
func (*Root) MarshalProtoJSON ¶
func (x *Root) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Root message to JSON.
func (*Root) MarshalProtoText ¶
func (*Root) MarshalToSizedBufferVT ¶
func (*Root) ProtoMessage ¶
func (*Root) ProtoMessage()
func (*Root) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Root from JSON.
func (*Root) UnmarshalProtoJSON ¶
func (x *Root) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Root message from JSON.
func (*Root) UnmarshalVT ¶
type Run ¶
type Run struct {
// Records contains complete keys in ascending byte order.
Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
// contains filtered or unexported fields
}
Run stores sorted small records, newest runs taking precedence.
func (*Run) CloneMessageVT ¶
func (m *Run) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Run) EqualMessageVT ¶
func (*Run) GetRecords ¶
func (*Run) MarshalJSON ¶
MarshalJSON marshals the Run to JSON.
func (*Run) MarshalProtoJSON ¶
func (x *Run) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Run message to JSON.
func (*Run) MarshalProtoText ¶
func (*Run) ProtoMessage ¶
func (*Run) ProtoMessage()
func (*Run) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Run from JSON.
func (*Run) UnmarshalProtoJSON ¶
func (x *Run) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Run message from JSON.
func (*Run) UnmarshalVT ¶
type RunFile ¶
type RunFile struct {
// Name is the immutable run file name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Bytes is the encoded run length, choosing which runs to merge.
Bytes uint32 `protobuf:"varint,2,opt,name=bytes,proto3" json:"bytes,omitempty"`
// Records counts every record in the run, including deletions.
Records uint32 `protobuf:"varint,3,opt,name=records,proto3" json:"records,omitempty"`
// Deleted counts deletion records that may hide older values.
Deleted uint32 `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"`
// contains filtered or unexported fields
}
RunFile names one immutable run and its encoded size.
func (*RunFile) CloneMessageVT ¶
func (m *RunFile) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*RunFile) EqualMessageVT ¶
func (*RunFile) GetDeleted ¶
func (*RunFile) GetRecords ¶
func (*RunFile) MarshalJSON ¶
MarshalJSON marshals the RunFile to JSON.
func (*RunFile) MarshalProtoJSON ¶
func (x *RunFile) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the RunFile message to JSON.
func (*RunFile) MarshalProtoText ¶
func (*RunFile) MarshalToSizedBufferVT ¶
func (*RunFile) ProtoMessage ¶
func (*RunFile) ProtoMessage()
func (*RunFile) UnmarshalJSON ¶
UnmarshalJSON unmarshals the RunFile from JSON.
func (*RunFile) UnmarshalProtoJSON ¶
func (x *RunFile) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the RunFile message from JSON.