storage

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 24 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

package: storage / composition type: logic job: CheckBookmarks — name the layers when a storage tree can hold no 𝒰_hist limits: reads Capabilities; the capability is each backend's to report (-> ranke-go)

package: storage / composition type: factory job: build one ranke.Universe from a storage section — a leaf, or a composite limits: wiring only; the persistence logic is ranke-go's adapters (-> github.com/rankegraph/ranke-go)

A composed stack or partition is itself a Universe, so the whole store is one recursive descriptor: a "type" selects a leaf or a composite, and composites recurse.

A layer's write role and content cap are the backend's, reported as ranke.Capabilities, so this package only fails a declaration that disagrees.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBookmarks = errors.New("storage: no configured layer can hold a bookmark store")

ErrNoBookmarks reports a storage tree that cannot hold 𝒰_hist.

Functions

func CheckBookmarks added in v1.20.0

func CheckBookmarks(ctx context.Context, sec scope.Section, u ranke.Universe) error

CheckBookmarks reports whether u can hold this archive's bookmark list. Both sequencer backends refuse such a Universe themselves; the layer names are what they cannot say, and the composition rules differ, so the remedy does too.

Types

type Layer

type Layer struct {
	Name string
	Type string
}

Layer is what introspection may report of a configured layer: a name and a type.

func Describe

func Describe(ctx context.Context, sec scope.Section) ([]Layer, error)

Describe reports the configured layers top to bottom, touching no backend. A layer takes its optional "name" key, else its type.

type Storage

type Storage = ranke.Universe

Storage is the storage port's product: a ranke.Universe. A composed stack or partition implements Universe too, so the whole store presents as this one type.

func New

func New(ctx context.Context, sec scope.Section) (Storage, error)

New builds the storage universe described by sec (see the package doc for the descriptor shape).

Jump to

Keyboard shortcuts

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