Skip to content

Latest commit

 

History

History
84 lines (66 loc) · 4.68 KB

File metadata and controls

84 lines (66 loc) · 4.68 KB
title pg hardstorage server
description CLI reference for the pg hardstorage server command.
tags
cli
reference

pg_hardstorage server

Run the control plane

Synopsis

Run the pg_hardstorage control plane.

v0.1 cut: HTTP/REST listener with mTLS + bearer-token auth, an in-memory agent registry, repo-walking handlers for deployments + backups. adds the PostgreSQL-backed job registry: pass --coord-backend pg --coord-dsn 'postgres://...' to persist dispatch state across restarts and to run multiple control planes against the same database (FOR UPDATE SKIP LOCKED gives atomic claims).

The control plane never uses an embedded database (no SQLite, no BoltDB). State is either in-memory (default) or in a PostgreSQL the operator already runs.

Endpoints (all under /v1/):

GET /healthz (no auth) GET /readyz (no auth; per-repo reachability) GET /version GET /deployments GET /deployments//backups GET /agents [?include_inactive=true] POST /agents/heartbeat

The flags below override the config file's server: block. Use --config to point at a YAML; flag overrides win.

pg_hardstorage server [flags]

Options

      --client-ca string          client CA bundle (enables mTLS with verify)
      --coord-backend string      coordination backend for jobs: memory (default, ephemeral) | pg (persistent, multi-instance HA) (default "memory")
      --coord-dsn string          PostgreSQL DSN when --coord-backend pg (postgres://user:pass@host/db?sslmode=...)
  -h, --help                      help for server
      --listen string             bind address (host:port) (default "127.0.0.1:8443")
      --max-concurrent-jobs int   cap on jobs running at once across the fleet (0 = unlimited; backpressure so a burst can't storm storage/PostgreSQL). For multi-control-plane HA set the same value on every instance.
      --repo stringArray          repository URL to index (repeatable)
      --tls-cert string           TLS server certificate (PEM)
      --tls-key string            TLS server key (PEM)
      --token-file string         file containing the bearer token (single-line)

Options inherited from parent commands

      --airgapped airgapped: strict                                                       refuse outbound endpoints (LLM providers, sinks, OTLP collectors) outside loopback / RFC1918 / explicit airgap.allowlist. Also enabled by PG_HARDSTORAGE_AIRGAPPED=1 or airgapped: strict in the config file.
  -c, --config string                                                                     path to config file (default: XDG/FHS lookup)
      --cpu-profile go tool pprof <path>                                                  write a pprof CPU profile to this path for the duration of the command (go tool pprof <path> to analyse). Off when empty.
      --mem-profile string                                                                write a pprof heap profile to this path at command exit. Off when empty.
      --no-color                                                                          disable ANSI color in text output
      --on-error-llm                                                                      on a structured-error failure, drop into the matching LLM helper skill (auto_on_error trigger). Also enabled by PG_HARDSTORAGE_ON_ERROR_LLM=1.
      --otel-endpoint string                                                              OpenTelemetry OTLP/HTTP endpoint (e.g. http://otel-collector:4318); empty disables tracing
      --otel-stdout                                                                       also export OpenTelemetry traces to stderr (useful for dev)
  -o, --output string                                                                     output format: text|json|ndjson|yaml|template|csv|markdown|html|tap|junit|pdf (default: text on TTY, json off-TTY)
      --profile-port go tool pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=30   if non-zero, expose net/http/pprof on 127.0.0.1:<port> for live profiling of long-running commands (e.g. go tool pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=30). Off when zero.
  -q, --quiet                                                                             suppress non-essential output
      --template string                                                                   Go text/template applied when --output template (or implied if --template is set without --output)

SEE ALSO