Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeforeReadParams ¶
type FilterReadDBIParams ¶
type Hooks ¶
type Hooks struct {
// AfterSnapshotUnpack is called after a remote snapshot is unpacked into memory
AfterSnapshotUnpack func(*snapshot.Snapshot) error
// UpdateSnapshotInfo is called after a snapshot is created but
// before it is stored.
UpdateSnapshotInfo func(SnapshotInfo) error
// UpdateStored is called when an update is written to storage.
// This is equal to the event with the same name, but with synchronous
// processing.
UpdateStored func(info events.UpdateInfo) error
// SnapshotOverdue is called when we force a snapshot due to a
// forced snapshot interval.
// This is equal to the event with the same name, but with synchronous
// processing.
SnapshotOverdue func() error
// BeforeRead is called in SendOnce when the transaction is just opened
BeforeRead func(params BeforeReadParams) error
// FilterReadDBI is called in readDBI to perform any filtering
FilterReadDBI func(p FilterReadDBIParams) bool // included if it returns true
// Returns a channel that can inject other updates into the sync loop
OtherUpdateSource func() <-chan snapshot.Update
}
Hooks allow running extra code at specific points of the sync flow (LSE). These hooks are run synchronously, the calling code waits for the response.
Click to show internal directories.
Click to hide internal directories.