Documentation
¶
Overview ¶
Package backuphooks materializes its package-local database quiesce-hook contract (db-hooks.cue, embedded at build time) into the generated backup-hooks.json manifest, and gives the node-side backup engine a typed view of it. CUE remains the single source of truth: this package never defines hooks of its own, it only evaluates and transports them.
Index ¶
Constants ¶
const ManifestFileName = "backup-hooks.json"
ManifestFileName is the artifact name under the generated .stackkit/ metadata directory (mirrors backup-recovery-plan.json).
const SchemaVersion = "backup-hooks/v1"
SchemaVersion identifies the manifest wire format.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hook ¶
type Hook struct {
Engine string `json:"engine"`
Container string `json:"container"`
Detect Detect `json:"detect"`
Sqlite *SqliteHook `json:"sqlite,omitempty"`
Postgres *PostgresHook `json:"postgres,omitempty"`
Redis *RedisHook `json:"redis,omitempty"`
Mariadb *MariadbHook `json:"mariadb,omitempty"`
Mongodb *MongodbHook `json:"mongodb,omitempty"`
}
Hook mirrors db-hooks.cue #DBHook. Engine-specific blocks are pointers so JSON round-trips stay sparse.
type Manifest ¶
Manifest is the generated artifact consumed by the node-side backup_run handler. Hooks carry the concretized CUE defaults so the executor never re-derives contract values.
func Build ¶
Build evaluates the embedded db-hooks contract and returns the manifest with the builtin hooks and their defaults concretized.
func (Manifest) MarshalIndent ¶
MarshalIndent renders the manifest in the generated-artifact style (trailing newline, two-space indent) used by backup-recovery-plan.json.
type MariadbHook ¶
type MongodbHook ¶
type MongodbHook struct {
OutDir string `json:"outDir"`
}