// 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-control/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") }