Documentation
¶
Overview ¶
Package syncdb provides SQLite-based sync state management.
Index ¶
- type DB
- func (d *DB) ClearFileMessages(filePath string) error
- func (d *DB) Close() error
- func (d *DB) DeleteState(filePath string) error
- func (d *DB) GetAllStates() ([]*SyncState, error)
- func (d *DB) GetState(filePath string) (*SyncState, error)
- func (d *DB) IsSynced(filePath, messageHash string) (bool, error)
- func (d *DB) RecordError(filePath, errorMsg string) error
- func (d *DB) RecordSyncedMessage(filePath, messageHash, spanID string) error
- func (d *DB) SaveState(state *SyncState) error
- func (d *DB) Stats() (*Stats, error)
- type Stats
- type SyncState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB wraps the SQLite database connection.
func (*DB) ClearFileMessages ¶
ClearFileMessages clears all synced messages for a file. Used when compaction is detected.
func (*DB) DeleteState ¶
DeleteState removes the sync state for a file.
func (*DB) GetAllStates ¶
GetAllStates returns all sync states.
func (*DB) RecordError ¶
RecordError records a sync error.
func (*DB) RecordSyncedMessage ¶
RecordSyncedMessage records that a message has been synced.
Click to show internal directories.
Click to hide internal directories.