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.
Click to show internal directories.
Click to hide internal directories.