seedgen

command
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Command seedgen regenerates the seed index the binary carries from the live relay.

THE SEED IS A COPY, NOT A COMPOSITION. internal/pool/index/seed.json is the fallback a machine with no cache picks from, and it must be the pool the relay publishes rather than a hand-authored snapshot that lags it. This command fetches the signed index through internal/pool/pull — the same signature and size checks a running install makes — reads it through internal/pool/index.Parse, and writes the seed back out deterministically: fixed key order, cells sorted by metric then by the metric's own dims in the order they were declared.

IT COPIES BY DECLARATION. Every metric the document declares is copied with its declaration, and every cell with its metric's dims, VERBATIM — so a metric or a dim this build has never seen passes through unchanged as long as Parse accepts the document, and no metric name or cell address is hard-coded in the copier. The only thing merged rather than copied is the aliases: the embedded seed's entries sit UNDER the live document's, so an alias the relay has since dropped from its own map still survives in the seed.

Usage:

go run ./internal/pool/index/cmd/seedgen [-url url] [-mirror url]
    [-key base64 ...] [-out path] [-cells path] [-check]

Run it from the repository root: the default -out and -cells are the repository's own paths. -check diffs the files against what the relay would write and writes nothing, leaving on exit 1 when they drift.

Jump to

Keyboard shortcuts

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