Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(parameters Parameters) (eventsourcing.CommitMiddleware, eventsourcing.RefreshMiddleware, func() error)
Create a snapbase middleware with the specified parameters
Types ¶
type CloseCallback ¶
type CloseCallback func() error
CloseCallback is a callback that closes the inner provider
type GetCallback ¶
GetCallback fetches a snapshot
type Parameters ¶
type Parameters struct { Lazy bool // Lazy provider SnapInterval int64 // Frequency between snaps Close CloseCallback // Close callback Get GetCallback // Get entry from snapshot storage Purge PurgeCallback // Purge an entr Put PutCallback // Put entry into the snapshot storage }
Parameters is a structure that contains the various common callbacks that are required for a snap-provider to work correctly, as well as any additional parameters.
type PurgeCallback ¶
PurgeCallback purges an entry from the store.
type PutCallback ¶
PutCallback is the callback that writes to the store
Click to show internal directories.
Click to hide internal directories.