Documentation
¶
Index ¶
- Variables
- type ArcTable
- func (m *ArcTable) Base() arctable.ArcTable
- func (m *ArcTable) BatchGet(ctx context.Context, namespace string, root cid.Cid, paths []arcset.Path) (map[arcset.Path]cid.Cid, error)
- func (m *ArcTable) Close() error
- func (m *ArcTable) CreateNamespace(ctx context.Context, namespace string, cfg *bloom.NamespaceConfig) error
- func (m *ArcTable) Get(ctx context.Context, namespace string, root cid.Cid, path arcset.Path) (cid.Cid, error)
- func (m *ArcTable) GetParent(ctx context.Context, namespace string, version cid.Cid) (cid.Cid, error)
- func (m *ArcTable) Iterate(ctx context.Context, namespace string, root cid.Cid) arcset.Iterator
- func (m *ArcTable) ResetStats()
- func (m *ArcTable) Snapshot(ctx context.Context, namespace string, root cid.Cid) (arcset.ArcSet, error)
- func (m *ArcTable) SnapshotStats() ArcTableStats
- func (m *ArcTable) SupportsConcurrentBranches() bool
- func (m *ArcTable) Update(ctx context.Context, namespace string, newRoot, oldRoot cid.Cid, ...) error
- type ArcTableStats
- type CASStats
- type CASStatsRecorder
- type ProofStats
- type ProofStatsRecorder
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
var ErrNamespaceCreatorUnsupported = errors.New("wrapped arctable does not support namespace creation")
ErrNamespaceCreatorUnsupported is returned when a wrapped ArcTable cannot create namespaces.
var ErrParentLookupUnsupported = errors.New("wrapped arctable does not support parent lookup")
ErrParentLookupUnsupported is returned when a wrapped ArcTable cannot read root parents.
Functions ¶
This section is empty.
Types ¶
type ArcTable ¶
type ArcTable struct {
// contains filtered or unexported fields
}
ArcTable wraps an arctable.ArcTable and records evaluation counters.
func NewArcTable ¶
NewArcTable wraps base with ArcTable operation counters.
func (*ArcTable) BatchGet ¶
func (m *ArcTable) BatchGet(ctx context.Context, namespace string, root cid.Cid, paths []arcset.Path) (map[arcset.Path]cid.Cid, error)
BatchGet retrieves multiple target CIDs in a single operation.
func (*ArcTable) CreateNamespace ¶
func (m *ArcTable) CreateNamespace(ctx context.Context, namespace string, cfg *bloom.NamespaceConfig) error
CreateNamespace forwards namespace creation when the wrapped ArcTable supports it.
func (*ArcTable) Get ¶
func (m *ArcTable) Get(ctx context.Context, namespace string, root cid.Cid, path arcset.Path) (cid.Cid, error)
Get retrieves the target CID for (namespace, root, path).
func (*ArcTable) GetParent ¶
func (m *ArcTable) GetParent(ctx context.Context, namespace string, version cid.Cid) (cid.Cid, error)
GetParent forwards version-parent lookups when the wrapped ArcTable supports it.
func (*ArcTable) ResetStats ¶
func (m *ArcTable) ResetStats()
ResetStats clears all ArcTable counters.
func (*ArcTable) Snapshot ¶
func (m *ArcTable) Snapshot(ctx context.Context, namespace string, root cid.Cid) (arcset.ArcSet, error)
Snapshot returns an immutable snapshot of all arcs for a given root.
func (*ArcTable) SnapshotStats ¶
func (m *ArcTable) SnapshotStats() ArcTableStats
SnapshotStats returns the current ArcTable counters.
func (*ArcTable) SupportsConcurrentBranches ¶ added in v0.0.2
SupportsConcurrentBranches forwards branching capability to the wrapped ArcTable when it advertises MVCC-style children from the same parent root.
type ArcTableStats ¶
type ArcTableStats struct {
GetCount uint64 `json:"get_count"`
BatchGetCount uint64 `json:"batch_get_count"`
BatchGetPathCount uint64 `json:"batch_get_path_count"`
UpdateCount uint64 `json:"update_count"`
UpdateArcCount uint64 `json:"update_arc_count"`
SnapshotCount uint64 `json:"snapshot_count"`
SnapshotArcCount uint64 `json:"snapshot_arc_count"`
IterateCount uint64 `json:"iterate_count"`
}
ArcTableStats is a point-in-time snapshot of ArcTable operation counters.
type CASStatsRecorder ¶
type CASStatsRecorder = cas.StatsRecorder
CASStatsRecorder records CAS counters with atomic updates.
type ProofStats ¶
type ProofStats struct {
ProofListCount uint64 `json:"proof_list_count"`
StepCount uint64 `json:"step_count"`
EvidenceBytes uint64 `json:"evidence_bytes"`
ProofBytes uint64 `json:"proof_bytes"`
TotalBytes uint64 `json:"total_bytes"`
}
ProofStats is a point-in-time snapshot of verifier proof byte counters.
type ProofStatsRecorder ¶
type ProofStatsRecorder struct {
// contains filtered or unexported fields
}
ProofStatsRecorder records proof-list shape and byte counters.
func (*ProofStatsRecorder) RecordProofList ¶
func (r *ProofStatsRecorder) RecordProofList(pl prooflist.ProofList)
RecordProofList records the available byte accounting for one ProofList.
func (*ProofStatsRecorder) Reset ¶
func (r *ProofStatsRecorder) Reset()
Reset clears all proof counters.
func (*ProofStatsRecorder) Snapshot ¶
func (r *ProofStatsRecorder) Snapshot() ProofStats
Snapshot returns the current proof counters.
type Snapshot ¶
type Snapshot struct {
CAS CASStats `json:"cas"`
ArcTable ArcTableStats `json:"arctable"`
Proof ProofStats `json:"proof"`
}
Snapshot is a point-in-time view of node-local evaluation counters.