-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc.go
More file actions
26 lines (26 loc) · 1.6 KB
/
Copy pathdoc.go
File metadata and controls
26 lines (26 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Package qi provides transport-agnostic helpers for replicating JSON object
// documents on top of github.com/iamseth/yin.
//
// yin owns the CRDT data structures, version vectors, JSON object encoding, and
// delta formats. qi layers visible-file, checkpoint, and transport-agnostic
// session behavior around those primitives. Store is the owning, synchronized
// generation-validation boundary; JSONFile and Session are lower-level and
// require caller coordination.
//
// NewStore constructs an in-memory Store. OpenDurableStore instead makes an
// application-owned CheckpointCommitter the acceptance boundary for every
// mutation: ordinary errors leave memory and authority unchanged, while an error
// wrapping ErrDurabilityUncertain means publication occurred and memory was
// updated to match. The application loads the initial checkpoint bytes and must
// give the Store exclusive ownership of their matching authority. OpenStore is
// the filesystem-backed CLI-oriented convenience constructor when dataDir is
// non-empty. Its visible path is startup input only; Store retains no paths and
// exposes later projection I/O through byte-oriented methods.
//
// Visible JSON, qi checkpoint envelopes, yin snapshots, and yin deltas are
// distinct artifacts. A committer receives complete restart state; visible JSON
// and separately requested synchronization artifacts are not a substitute for
// the bytes accepted by that authority. The p2p subpackage provides pull-based
// libp2p synchronization. Runtime-local causal replica identity remains separate
// from document identity and network peer identity.
package qi