Files
jschoubben c3b88b9148 Rename mesh-control -> mesh-controller, substrate -> foundation
One name per thing, per the HQ glossary: the module/container/image/binary/repo
becomes mesh-controller, the seat the-controller, and the store+broker pair the
foundation (embedded base bundles, default template and example lock renamed with
their go:embed directives). No behaviour change — a pure vocabulary rename.

Claude-Session: https://claude.ai/code/session_01D6qtiYU3P9jk3pnAXyAFyx
2026-09-16 18:40:40 +02:00

30 lines
1018 B
Go

// Package inventory is the context that knows which machines are in the mesh.
//
// novox/hq ADR 0006 names seven contexts; this is the first built, because everything else needs
// to be able to say which node it is talking about.
//
// It owns its store exclusively (novox/hq ADR 0008) — a database called `inventory`, reached with
// a credential no other context holds.
package inventory
import (
"embed"
"github.com/novox/mesh-controller/internal/store"
)
// Name is what this context is called: its database, and the environment variable holding the
// credential for it, are both derived from this.
const Name = "inventory"
//go:embed migrations/*.sql
var files embed.FS
// Migrations are the schema changes this context carries, in order.
//
// Embedded, so the binary and its schema are one artifact: an image cannot run this code against
// a directory of migrations from a different version of it.
func Migrations() ([]store.Migration, error) {
return store.LoadMigrations(files, "migrations")
}