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

flowstore

package module
v0.1.5 Latest Latest
Warning

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

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

README

flowstore

github.com/looprig/flow/store (package flowstore) is the optional adapter from the neutral storage.Ledger interface to Flow's durable flow.CheckpointStore. It persists a versioned, bounded JSON envelope under the canonical ledger name flow/runs/<graph-run-id> and translates definite ledger conflicts into Flow *flow.RevisionConflictErrors. Other failures are returned as *flow.StoreError.

It is a nested module inside the flow repository, released on its own cadence at store/vX.Y.Z tags; its version is independent of the root flow module's.

Install

go get github.com/looprig/flow/store@latest

Usage

Construction is backend-neutral:

import flowstore "github.com/looprig/flow/store"

checkpoints := flowstore.New(ledger) // any storage.Ledger; returns nil for a nil ledger
runner, err := g.Compile(entryID, finishID, flow.WithStore(checkpoints))

The caller supplies the concrete ledger: for example an fsstore ledger for a local deployment, or any other backend that conforms to the storage contract. This module does not import or recommend a particular backend.

The adapter rejects unknown JSON fields, trailing data, oversized records (over 1 MiB), excessive nesting, run-identity mismatches, and sequence/revision mismatches.

Where it sits

Tier 2 of the Looprig workspace. Production dependencies: flow and storage. core and fsstore are test-only; fsstore is used only by the integration-tagged test.

Development

The Go baseline is 1.26.9. Run from this directory:

GOWORK=off go test ./...
GOWORK=off go test -tags integration ./...   # adds the fsstore round-trip test
make check    # fmt-check, vet, test, race, staticcheck, gosec, govulncheck, build

License

Apache License 2.0. See LICENSE.

Documentation

Overview

Package flowstore adapts the neutral storage.Ledger contract to Flow's append-only checkpoint store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ledger storage.Ledger) flow.CheckpointStore

New constructs a Flow checkpoint store over exactly one neutral Ledger. Concrete backends such as fsstore are supplied by the caller.

Types

This section is empty.

Jump to

Keyboard shortcuts

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