wal

package
v0.0.0-...-72c1dcb Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 17 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,
) (*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

Jump to

Keyboard shortcuts

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