localdb

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Initializer
	Closer

	// Determines whether the local db was not present and had to be created
	DbWasNewlyCreated() bool

	MarkAsShuttingDown()

	CommitGeneration(gen1 *Generation, gen2 *Generation) error

	// Stores the group offset for a topic and token+index
	SaveOffset(offsetKv *OffsetStoreKeyValue) error

	// Retrieves all the stored offsets
	Offsets() ([]OffsetStoreKeyValue, error)

	// Gets latest generation stored per token
	LatestGenerations() ([]Generation, error)

	// Gets the following (children) generations
	GenerationsByParent(gen *Generation) ([]Generation, error)

	// Gets the last two (more recent first) stored generation by start token
	GetGenerationsByToken(token Token, clusterSize int) ([]Generation, error)

	// Gets the generation by token and version, returns nil when not found
	GenerationInfo(token Token, version GenVersion) (*Generation, error)

	// Determines whether the localdb is being closed as a result of an application shutting down
	IsShuttingDown() bool
}

Client represents a local db client.

func NewClient

func NewClient(config conf.LocalDbConfig) Client

NewClient creates a new instance of Client.

Jump to

Keyboard shortcuts

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