Usage
The event stream is accessible atGET /events on your LiteFS node:
Event Types
init
The init event is always the first event published to an event stream. It includes
basic information about whether the local node is the primary and, if not, the
hostname of the current primary. More fields may be added to this event in the future.
tx
This event is published every time a new transaction is written to LiteFS. This
event will fire whether the transaction is performed locally as the primary or
if the transaction was received by a replica.
The txID field is a hex-formatted transaction ID. The postApplyChecksum is
a checksum of the entire database after the transaction has been applied. These
two fields form the replication position.
The commit field is the size of the database in pages and can be multiplied by
the pageSize field to give you the total size of the database file in bytes.
The timestamp field is the timestamp of when the transaction was originally
written on the primary node. This is not always reliable as clocks can skew
between different servers.