Documentation
¶
Overview ¶
Package consoleapp is the importable command layer of the bintrail-console binary — the console sibling of the cliapp seam. cmd/bintrail-console is a thin main() over it; embedding distributions build their own console binary the same way and may install ext seams (e.g. ext.SetConsoleAuth for an external login flow) from main() before calling Main. The console server reads those seams at construction time, so installs after Main returns are never picked up.
The console is the MCP server with a web face: browse indexed row events with full before/after diffs, generate recovery (undo) SQL, and — when baselines are configured — run point-in-time reconstruct, all from a browser. The console NEVER executes SQL; recover produces a script you review and apply.
bintrail-console serve --index-dsn "user:pass@tcp(127.0.0.1:3306)/binlog_index"
Configuration mirrors the core CLI: a .bintrail.env (or ~/.config/bintrail/config.env) file is loaded on startup and the BINTRAIL_INDEX_DSN / BINTRAIL_CONSOLE_* env vars are honored with flag > env > default precedence.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Main ¶
Main configures build metadata and runs the bintrail-console root command, returning the process exit code. Callers (cmd/bintrail-console, and external distributions embedding the console) are expected to pass their -ldflags-injected version values and os.Exit with the result.
func RunSQLWorkerIfInvoked ¶ added in v0.92.0
func RunSQLWorkerIfInvoked()
RunSQLWorkerIfInvoked is meant to be the FIRST line of a main() that embeds this package: when the process was started as the SQL sandbox worker (its first argument is sqlsandbox.WorkerCommand) it runs the job and exits, so whatever setup that main() does before calling Main is not repeated for every query. cmd/bintrail-console calls it. A main() that does not is still served by the hidden command below, one cobra dispatch later.
Types ¶
Source Files
¶
- backup_disk.go
- backup_disk_unix.go
- backup_settings_live.go
- baseline.go
- baseline_compact.go
- baseline_job_guard.go
- baseline_refresh_gate.go
- baseline_refresh_loop.go
- baseline_restore.go
- baseline_schedule_loop.go
- baseline_tls.go
- boot_flavor.go
- capture_probe.go
- capture_status.go
- capture_status_mariadb.go
- composedrift.go
- crashloop.go
- flashback.go
- fold_disk.go
- fold_refusal.go
- mainstream.go
- monitor.go
- monitor_replica.go
- monitor_replica_mariadb.go
- notify.go
- refresh_new_tables.go
- registry_load.go
- root.go
- schema_snapshot.go
- serve.go
- snapshot_failure.go
- source_author.go
- source_conn.go
- sql_export.go
- sqlworker.go
- user.go
- verify.go
- watch.go