cmd holds the two package main binaries of the github.com/coder/openstorage module. It has no source files of its own. Each binary composes packages from internal/ and adds no domain logic beyond configuration, wiring, and operator commands.
openstorageis the service binary.serveruns the API, Git, eventing, sync, and background-job stack on one HTTP listener. The other subcommands are offline operator tools.dstis a developer tool. It replays one deterministic simulation run by seed throughinternal/simtest.
- openstorage: ./openstorage/README.md - Composition root. Resolves
OPENSTORAGE_*environment variables and flags into a validated config (config.go), wires the stores and services (wire*.go), and serves/api/,/healthz, and Git smart HTTP at/, with an optional metrics listener. Subcommands:serve,hook,keygen,mint,signing-key,list-packs,purge-repo,repair-refs,s3wal-meta,version. A failure that reaches[openstorage/main.go:fatalf]exits1. A flag parse error exits2, because every subcommand flag set usesflag.ExitOnError([openstorage/main.go:cmdServe]and the other subcommand entry points). Thehooksubcommand also exits42at two crash test knobs, only whenOPENSTORAGE_TEST_MODE=1andOPENSTORAGE_TEST_CRASHisafter-reserveorafter-s3([../internal/githttp/hook.go:testMode],[../internal/githttp/hook.go:EnvCrash]). Verify withgo test ./cmd/openstorage/... -tags=openstorage_viewcheck -count=1 -race -timeout=30m. - dst: ./dst/README.md - Deterministic simulation replay. Flags
-seed,-steps,-nodes,-backend(sqliteors3wal),-v,-keep. Exits0clean,1invariant violation,2infrastructure failure. Verify withgo test ./cmd/dst/... -tags=openstorage_viewcheck -count=1 -race -timeout=30m.cmd/dsthas no test files, so this command only compiles the package.