29 lines
685 B
Go
29 lines
685 B
Go
|
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
|
||
|
}
|