store

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReadStoreEmptyErr error = errors.New("error reading, store is empty")
View Source
var WriteStoreClosedErr error = errors.New("error writing, store is closed")
View Source
var WriteStoreFullErr error = errors.New("error writing, store is full")

Functions

This section is empty.

Types

type Store

type Store interface {
	// Read returns upto N(size) messages from the persisted store, it also returns
	// a boolean flag to indicate if the end of file has been reached.
	Read(size int64) ([]*isb.ReadMessage, bool, error)
	// Write writes message to persistence store
	Write(msg *isb.ReadMessage) error
	// Close closes store
	Close() error
}

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

type StoreProvider

type StoreProvider interface {
	// CreateStore returns a new store instance.
	CreateStore(context.Context, partition.ID) (Store, error)
	// DiscoverPartitions discovers all the managed partitions.
	DiscoverPartitions(context.Context) ([]partition.ID, error)
	// DeleteStore deletes the store
	DeleteStore(partition.ID) error
}

StoreProvider defines the functions for store implementation

Directories

Path Synopsis
Package wal implements write-ahead-log.
Package wal implements write-ahead-log.

Jump to

Keyboard shortcuts

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