Skip to content

Commit cced03d

Browse files
corylanouclaude
andcommitted
docs: standardize configuration examples to use singular 'replica' format
Update all documentation, examples, and test helpers to use the singular `replica:` format instead of the deprecated `replicas:` array format. This aligns with: - Current codebase architecture (one replica per database) - Online documentation standard at litestream.io - Deprecation of plural format in cmd/litestream/main.go:478-479 Changes: - etc/litestream.yml: Convert to singular format (from PR #749) - .claude/agents/replica-client-developer.md: Update config pattern - .claude/commands/add-storage-backend.md: Update documentation example - .github/workflows/commit.yml: Update CI test configs - AGENTS.md: Update configuration example - tests/integration/soak_helpers.go: Update test config generator The code continues to support both formats for backward compatibility, but the singular format is now the documented standard. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent bfce8b4 commit cced03d

File tree

5 files changed

+28
-28
lines changed

5 files changed

+28
-28
lines changed

.claude/agents/replica-client-developer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ go test -race -v ./[backend]/...
101101
## Configuration Pattern
102102

103103
```yaml
104-
replicas:
105-
- type: [backend]
106-
option1: value1
107-
option2: value2
104+
replica:
105+
type: [backend]
106+
option1: value1
107+
option2: value2
108108
```
109109
110110
## References

.claude/commands/add-storage-backend.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ Create a new storage backend implementation for Litestream with all required com
7171
5. **Add Documentation**
7272
Update README.md with configuration example:
7373
```yaml
74-
replicas:
75-
- type: {{backend_name}}
76-
option1: value1
77-
option2: value2
74+
replica:
75+
type: {{backend_name}}
76+
option1: value1
77+
option2: value2
7878
```
7979
8080
## Key Requirements

.github/workflows/commit.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,13 @@ jobs:
300300
cat > /tmp/sftp-concurrent.yml <<EOF
301301
dbs:
302302
- path: /tmp/test-concurrent.db
303-
replicas:
304-
- type: sftp
305-
host: localhost:2222
306-
key-path: /test/id_ed25519
307-
user: root
308-
path: /test/data/concurrent
309-
concurrent-writes: true
303+
replica:
304+
type: sftp
305+
host: localhost:2222
306+
key-path: /test/id_ed25519
307+
user: root
308+
path: /test/data/concurrent
309+
concurrent-writes: true
310310
EOF
311311
312312
# Create test database
@@ -326,12 +326,12 @@ jobs:
326326
cat > /tmp/sftp-sequential.yml <<EOF
327327
dbs:
328328
- path: /tmp/test-sequential.db
329-
replicas:
330-
- type: sftp
331-
host: localhost:2222
332-
key-path: /test/id_ed25519
333-
user: root
334-
path: /test/data/sequential
329+
replica:
330+
type: sftp
331+
host: localhost:2222
332+
key-path: /test/id_ed25519
333+
user: root
334+
path: /test/data/sequential
335335
concurrent-writes: false
336336
EOF
337337

AGENTS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -771,11 +771,11 @@ go test -race -v -run TestStore_CompactDB ./...
771771
```yaml
772772
dbs:
773773
- path: /path/to/db.sqlite
774-
replicas:
775-
- type: s3
776-
bucket: my-bucket
777-
path: db-backup
778-
sync-interval: 10s # How often to sync
774+
replica:
775+
type: s3
776+
bucket: my-bucket
777+
path: db-backup
778+
sync-interval: 10s # How often to sync
779779

780780
# Compaction configuration (default)
781781
levels:

tests/integration/soak_helpers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ func CreateSoakConfig(dbPath, replicaURL string, s3Config *S3Config, shortMode b
418418
config.WriteString(" min-checkpoint-page-count: 100\n")
419419
config.WriteString(" max-checkpoint-page-count: 5000\n")
420420
config.WriteString("\n")
421-
config.WriteString(" replicas:\n")
422-
config.WriteString(fmt.Sprintf(" - url: %s\n", replicaURL))
421+
config.WriteString(" replica:\n")
422+
config.WriteString(fmt.Sprintf(" url: %s\n", replicaURL))
423423

424424
// Add S3-specific settings if provided
425425
if s3Config != nil {

0 commit comments

Comments
 (0)