Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SetLog logCommand = 0x01 DeleteLog logCommand = 0x02 )
Functions ¶
func InitaliseWriteAheadLog ¶
func InitaliseWriteAheadLog( walDir string, maxLogSize int64, maxSegments int, log *zap.Logger, next jobstore.JobFetcher, ) (*walMiddleware, error)
InitaliseWriteAheadLog returns a instance of WAL on disk
Types ¶
type WALReader ¶
type WALReader interface { // Replay calls the function f on all the records from the offset f Replay(offset int64, f func([]byte) error) error // GetLatestOffset returns the latest offset GetLatestOffset() int64 // Close safely closes the WAL. All the data is persisted in WAL before closing Close() error }
WALReader reads all the changes from the disk
Click to show internal directories.
Click to hide internal directories.