wal

package
v0.0.0-...-036b087 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWAL

type FileWAL struct {
	// contains filtered or unexported fields
}

func Open

func Open(
	logger log.Logger,
	reg prometheus.Registerer,
	path string,
	opts ...TestingOption,
) (*FileWAL, error)

func (*FileWAL) Close

func (w *FileWAL) Close() error

func (*FileWAL) FirstIndex

func (w *FileWAL) FirstIndex() (uint64, error)

func (*FileWAL) LastIndex

func (w *FileWAL) LastIndex() (uint64, error)

func (*FileWAL) Log

func (w *FileWAL) Log(tx uint64, record *walpb.Record) error

func (*FileWAL) LogRecord

func (w *FileWAL) LogRecord(tx uint64, table string, record arrow.Record) error

func (*FileWAL) Replay

func (w *FileWAL) Replay(tx uint64, handler ReplayHandlerFunc) (err error)

func (*FileWAL) Reset

func (w *FileWAL) Reset(nextTx uint64) error

func (*FileWAL) RunAsync

func (w *FileWAL) RunAsync()

func (*FileWAL) Truncate

func (w *FileWAL) Truncate(tx uint64) error

Truncate queues a truncation of the WAL at the given tx. Note that the truncation will be performed asynchronously. A nil error does not indicate a successful truncation.

type NopWAL

type NopWAL struct{}

func (*NopWAL) Close

func (w *NopWAL) Close() error

func (*NopWAL) FirstIndex

func (w *NopWAL) FirstIndex() (uint64, error)

func (*NopWAL) LastIndex

func (w *NopWAL) LastIndex() (uint64, error)

func (*NopWAL) Log

func (w *NopWAL) Log(_ uint64, _ *walpb.Record) error

func (*NopWAL) LogRecord

func (w *NopWAL) LogRecord(_ uint64, _ string, _ arrow.Record) error

func (*NopWAL) Replay

func (w *NopWAL) Replay(_ uint64, _ ReplayHandlerFunc) error

func (*NopWAL) Reset

func (w *NopWAL) Reset(_ uint64) error

func (*NopWAL) Truncate

func (w *NopWAL) Truncate(_ uint64) error

type ReplayHandlerFunc

type ReplayHandlerFunc func(tx uint64, record *walpb.Record) error

type TestingOption

type TestingOption func(*FileWAL)

func WithTestingLogStoreWrapper

func WithTestingLogStoreWrapper(newLogStoreWrapper func(wal.LogStore) wal.LogStore) TestingOption

func WithTestingLoopTicker

func WithTestingLoopTicker(t Ticker) TestingOption

WithTestingLoopTicker allows the caller to force processing of pending WAL entries by providing a custom ticker implementation.

type Ticker

type Ticker interface {
	C() <-chan time.Time
	Stop()
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL