wal

package
v1.2.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// CreateWAL returns a new WAL instance.
	CreateWAL(context.Context, partition.ID) (WAL, error)
	// DiscoverWALs discovers all the existing WALs.
	// This is used to recover from a restart and replay all the messages from the WAL.
	DiscoverWALs(context.Context) ([]WAL, error)
	// DeleteWAL deletes the WAL.
	DeleteWAL(partition.ID) error
}

Manager defines the interface to manage the WALs.

type WAL

type WAL interface {
	// Replay to replay persisted messages during startup
	// returns a channel to read messages and a channel to read errors
	Replay() (<-chan *isb.ReadMessage, <-chan error)
	// Write writes message to the WAL.
	Write(msg *isb.ReadMessage) error
	// PartitionID returns the partition ID of the WAL.
	PartitionID() *partition.ID
	// Close closes WAL.
	Close() error
}

WAL provides methods to read, write and delete data from the WAL.

Directories

Path Synopsis
fs
Package fs implements write-ahead-log on FileSystem.
Package fs implements write-ahead-log on FileSystem.
fs
Package fs implements write-ahead-log on FileSystem.
Package fs implements write-ahead-log on FileSystem.

Jump to

Keyboard shortcuts

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