Initial commit
This commit is contained in:
28
lib/wal/design.go
Normal file
28
lib/wal/design.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package wal
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Info struct {
|
||||
FirstSeqNum int64
|
||||
LastSeqNum int64
|
||||
LastTimestampMS int64
|
||||
}
|
||||
|
||||
type Iterator interface {
|
||||
// Next will return false if no record is available during the timeout
|
||||
// period, or if an error is encountered. After Next returns false, the
|
||||
// caller should check the return value of the Error function.
|
||||
Next(timeout time.Duration) bool
|
||||
|
||||
// Call Record after Next returns true to get the next record.
|
||||
Record() Record
|
||||
|
||||
// The caller must call Close on the iterator so clean-up can be performed.
|
||||
Close()
|
||||
|
||||
// Call Error to see if there was an error during the previous call to Next
|
||||
// if Next returned false.
|
||||
Error() error
|
||||
}
|
||||
Reference in New Issue
Block a user