Skip to content

expose sync status - #3

Merged
till merged 2 commits into
mainfrom
expose-sync-status
Aug 2, 2026
Merged

expose sync status#3
till merged 2 commits into
mainfrom
expose-sync-status

Conversation

@till

@till till commented Aug 2, 2026

Copy link
Copy Markdown
Contributor
  • feat: expose status calls
  • chore(refactor): use named error values

till added 2 commits August 2, 2026 17:25
expose common "status" related calls so callers don't have to
reach deep into litestream.

 - Replicating() reports whether a replica is configured
 - LastSyncedAt() returns the time of the last successful sync
 - Retention() reports whether litestream owns retention
 - SyncStatus() reports if local/remote tx files match
add ErrExists and ErrReplicaEmpty next to ErrNotReplicating in
errors.go, and return them from Restore so callers can check the
error type with errors.Is — e.g. treat an empty replica as a
fresh install, or retry with force when the file exists.

also map litestream's ErrTxNotAvailable to ErrReplicaEmpty, since
the file client reports an empty replica that way.
@till till self-assigned this Aug 2, 2026
@till
till merged commit c8fdcf5 into main Aug 2, 2026
1 check passed
@till
till deleted the expose-sync-status branch August 2, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant