Documentation
¶
Overview ¶
Package wal provides a write-ahead log.
The WAL keeps track of all changes to a repo, that is, which contributor did change what and when.
Index ¶
- type Option
- type WAL
- func (w *WAL) Add(ctx context.Context, p string) (string, error)
- func (w *WAL) GetExpirationDuration() time.Duration
- func (w *WAL) ListEntries(ctx context.Context, fromToken string, max int) ([]model.Entry, string, error)
- func (w *WAL) ListTokens(ctx context.Context, fromToken string, max int) (tokens []string, next string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(w *WAL)
Options to the write-ahead log
func MaxConcurrency ¶
func TokenGeneratorPath ¶
type WAL ¶
type WAL struct {
// contains filtered or unexported fields
}
WAL describes a write-ahead log
func New ¶
New builds a new write-ahead log on some mutable store, with log entries stored at the walStore
func (*WAL) GetExpirationDuration ¶
func (*WAL) ListEntries ¶
func (*WAL) ListTokens ¶
func (w *WAL) ListTokens(ctx context.Context, fromToken string, max int) (tokens []string, next string, err error)
Reads the WAL starting from the tokens passed in. If startFrom is empty it will entry from beginning. Repeated reads can include duplicate tokens. No tokens are missed Returns false if the list has more entries that can be listed. Use the last Entry of the previous call to paginate to the next set of keys.
Click to show internal directories.
Click to hide internal directories.