mirror of
https://github.com/hanzoai/ha.git
synced 2026-09-30 22:38:49 +00:00
HRW (Rendezvous) single-writer election as its own coordination primitive — no coordinator, lock service, Postgres, or Redis. Answers "who is the single writer for key K" identically on every replica. Extracted from hanzoai/vfs/replica/owner.go (HIP-0107), which was storage-agnostic pure Go with no vfs-internal callers. Election (who writes) and replication (how state ships) are orthogonal; this is the cut. Generalizes orgID -> key (any ownership unit). API: Member, Owner, IsOwner, Replicas + the Membership seam + Static. Zero deps (stdlib crypto/sha256, encoding/binary, context).
4 lines
40 B
AMPL
4 lines
40 B
AMPL
module github.com/hanzoai/ha
|
|
|
|
go 1.26.4
|