diff options
| author | Fuwn <[email protected]> | 2026-02-26 16:34:38 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-26 16:34:38 -0800 |
| commit | a8135dbd6e2e64222a20a80d29f1f85ce3e240b0 (patch) | |
| tree | 62b45b1c98c1f7673ea16fa5912ba353044d7464 | |
| parent | style: align codebase with official Go idioms (diff) | |
| download | plutia-test-a8135dbd6e2e64222a20a80d29f1f85ce3e240b0.tar.xz plutia-test-a8135dbd6e2e64222a20a80d29f1f85ce3e240b0.zip | |
chore: rename template config to config.default.yaml
| -rw-r--r-- | README.md | 22 | ||||
| -rw-r--r-- | cmd/plutia/main.go | 24 | ||||
| -rw-r--r-- | config.default.yaml (renamed from config.yaml) | 0 | ||||
| -rw-r--r-- | docker-compose.yml | 2 |
4 files changed, 24 insertions, 24 deletions
@@ -30,18 +30,18 @@ Plutia is a deterministic, verifiable PLC mirror for `plc.directory` with signed ```bash go test ./... go build ./cmd/plutia -./plutia serve --config=config.yaml +./plutia serve --config=config.default.yaml ``` ### CLI Commands ```bash -plutia serve --config=config.yaml [--max-ops=0] -plutia replay --config=config.yaml [--max-ops=0] -plutia verify --config=config.yaml --did=did:plc:example -plutia snapshot --config=config.yaml -plutia bench --config=config.yaml --max-ops=200000 -plutia compare --config=config.yaml --remote=https://mirror.example.com +plutia serve --config=config.default.yaml [--max-ops=0] +plutia replay --config=config.default.yaml [--max-ops=0] +plutia verify --config=config.default.yaml --did=did:plc:example +plutia snapshot --config=config.default.yaml +plutia bench --config=config.default.yaml --max-ops=200000 +plutia compare --config=config.default.yaml --remote=https://mirror.example.com plutia version ``` @@ -138,9 +138,9 @@ Using benchmarked density (~1.2KB/op total): Always keep extra headroom for compaction, checkpoints, and operational buffers. -### Example `config.yaml` +### Example `config.default.yaml` -See [`config.yaml`](./config.yaml). Core knobs: +See [`config.default.yaml`](./config.default.yaml). Core knobs: - `mode` - `verify` @@ -157,7 +157,7 @@ services: plutia: image: golang:1.25 working_dir: /app - command: sh -lc "go build -trimpath -o /app/bin/plutia ./cmd/plutia && /app/bin/plutia serve --config=/app/config.yaml" + command: sh -lc "go build -trimpath -o /app/bin/plutia ./cmd/plutia && /app/bin/plutia serve --config=/app/config.default.yaml" ports: - "8080:8080" volumes: @@ -178,7 +178,7 @@ services: Use: ```bash -plutia compare --config=config.yaml --remote=https://mirror.example.com +plutia compare --config=config.default.yaml --remote=https://mirror.example.com ``` The command fetches remote `/checkpoints/latest` and compares: diff --git a/cmd/plutia/main.go b/cmd/plutia/main.go index e3e1a12..1c533af 100644 --- a/cmd/plutia/main.go +++ b/cmd/plutia/main.go @@ -84,7 +84,7 @@ func main() { func runServe(args []string) error { fs := flag.NewFlagSet("serve", flag.ExitOnError) - configPath := fs.String("config", "config.yaml", "config path") + configPath := fs.String("config", "config.default.yaml", "config path") maxOps := fs.Uint64("max-ops", 0, "max operations to ingest in this process (0 = unlimited)") if err := fs.Parse(args); err != nil { @@ -169,7 +169,7 @@ func runServe(args []string) error { func runReplay(args []string) error { fs := flag.NewFlagSet("replay", flag.ExitOnError) - configPath := fs.String("config", "config.yaml", "config path") + configPath := fs.String("config", "config.default.yaml", "config path") maxOps := fs.Uint64("max-ops", 0, "max operations to ingest in this process (0 = unlimited)") if err := fs.Parse(args); err != nil { @@ -206,7 +206,7 @@ func runReplay(args []string) error { func runVerify(args []string) error { fs := flag.NewFlagSet("verify", flag.ExitOnError) - configPath := fs.String("config", "config.yaml", "config path") + configPath := fs.String("config", "config.default.yaml", "config path") did := fs.String("did", "", "did to verify") if err := fs.Parse(args); err != nil { @@ -237,7 +237,7 @@ func runVerify(args []string) error { func runSnapshot(args []string) error { fs := flag.NewFlagSet("snapshot", flag.ExitOnError) - configPath := fs.String("config", "config.yaml", "config path") + configPath := fs.String("config", "config.default.yaml", "config path") if err := fs.Parse(args); err != nil { return err @@ -265,7 +265,7 @@ func runSnapshot(args []string) error { func runBench(args []string) error { fs := flag.NewFlagSet("bench", flag.ExitOnError) - configPath := fs.String("config", "config.yaml", "config path") + configPath := fs.String("config", "config.default.yaml", "config path") maxOps := fs.Uint64("max-ops", 200000, "max operations to ingest for benchmark") interval := fs.Duration("interval", 10*time.Second, "rolling report interval") @@ -359,7 +359,7 @@ func runBench(args []string) error { func runCompare(args []string) error { fs := flag.NewFlagSet("compare", flag.ExitOnError) - configPath := fs.String("config", "config.yaml", "config path") + configPath := fs.String("config", "config.default.yaml", "config path") remote := fs.String("remote", "", "remote mirror base URL") if err := fs.Parse(args); err != nil { @@ -526,12 +526,12 @@ func usage() { fmt.Fprintf(os.Stderr, `plutia: verifiable PLC mirror Commands: - plutia serve --config=config.yaml [--max-ops=0] - plutia replay --config=config.yaml [--max-ops=0] - plutia verify --config=config.yaml --did=did:plc:xyz - plutia snapshot --config=config.yaml - plutia bench --config=config.yaml [--max-ops=200000] [--interval=10s] - plutia compare --config=config.yaml --remote=https://mirror.example.com + plutia serve --config=config.default.yaml [--max-ops=0] + plutia replay --config=config.default.yaml [--max-ops=0] + plutia verify --config=config.default.yaml --did=did:plc:xyz + plutia snapshot --config=config.default.yaml + plutia bench --config=config.default.yaml [--max-ops=200000] [--interval=10s] + plutia compare --config=config.default.yaml --remote=https://mirror.example.com plutia version `) } diff --git a/config.yaml b/config.default.yaml index 8e09923..8e09923 100644 --- a/config.yaml +++ b/config.default.yaml diff --git a/docker-compose.yml b/docker-compose.yml index 03e430e..d26467b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ services: plutia: image: golang:1.25 working_dir: /app - command: sh -lc "go build -trimpath -o /app/bin/plutia ./cmd/plutia && /app/bin/plutia serve --config=/app/config.yaml" + command: sh -lc "go build -trimpath -o /app/bin/plutia ./cmd/plutia && /app/bin/plutia serve --config=/app/config.default.yaml" ports: - "8080:8080" volumes: |