You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* refactor: add support for postgres store(s)
closes#27
* fix: introduce MigratedPool type for proper startup
* refactor: remove job queue from postgres agent store
Copy file name to clipboardExpand all lines: CLAUDE.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,9 +42,11 @@ Sprue is the upload coordination service for Storacha local development. It rout
42
42
43
43
**Stores (pkg/store/)**
44
44
- Each domain has its own store interface in `pkg/store/<domain>/`
45
-
- Each store has two implementations: AWS (DynamoDB/S3) in `<domain>/aws/` and in-memory in `<domain>/memory/`
45
+
- Each store has three implementations: AWS (DynamoDB/S3) in `<domain>/aws/`, PostgreSQL (+ S3 for blob payloads) in `<domain>/postgres/`, and in-memory in `<domain>/memory/`
- AWS stores are wired in `internal/fx/store/aws/provider.go`, memory stores in `internal/fx/store/memory/provider.go`
47
+
- Backends are wired in `internal/fx/store/<backend>/provider.go` (aws, postgres, memory)
48
+
- Backend selection is driven by `storage.type` in config (`memory` | `postgres` | `aws`; default `postgres`). Per-backend settings live under `storage.postgres`, `storage.dynamodb`, and `storage.s3`.
49
+
- Postgres schema is managed by goose migrations in `internal/migrations/sql/`, embedded and applied on startup. Set `storage.postgres.skip_migrations: true` to disable.
48
50
49
51
**Services (pkg/)**
50
52
-`provisioning`: Manages space provisioning (consumers + subscriptions)
@@ -66,18 +68,21 @@ Sprue is the upload coordination service for Storacha local development. It rout
66
68
67
69
### Configuration
68
70
69
-
Configuration via YAML file or environment variables with `UPLOAD_` prefix:
0 commit comments