store

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Ensign maintains two separate storage locations on disk: the event store which is intended to be an append-only fast disk write for incoming events and a meta store which is used to persist operational metadata such as topic and placement information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(conf config.StorageConfig) (data EventStore, meta MetaStore, err error)

func OpenEvents

func OpenEvents(conf config.StorageConfig) (*events.Store, error)

func OpenMeta

func OpenMeta(conf config.StorageConfig) (*meta.Store, error)

Types

type EventStore

type EventStore interface {
	Store
}

type GroupStore added in v0.5.1

type GroupStore interface {
	ListGroups(projectID ulid.ULID) iterator.GroupIterator
	GetOrCreateGroup(*api.ConsumerGroup) (bool, error)
	UpdateGroup(*api.ConsumerGroup) error
	DeleteGroup(*api.ConsumerGroup) error
}

type MetaStore

type MetaStore interface {
	Store
	TopicStore
	TopicNamesStore
}

type Store

type Store interface {
	io.Closer
	ReadOnly() bool
}

type TopicNamesStore added in v0.5.1

type TopicNamesStore interface {
	ListTopicNames(projectID ulid.ULID) iterator.TopicNamesIterator
	TopicExists(in *api.TopicName) (*api.TopicExistsInfo, error)
	TopicName(topicID ulid.ULID) (string, error)
}

type TopicStore

type TopicStore interface {
	AllowedTopics(projectID ulid.ULID) ([]ulid.ULID, error)
	ListTopics(projectID ulid.ULID) iterator.TopicIterator
	CreateTopic(*api.Topic) error
	RetrieveTopic(topicID ulid.ULID) (*api.Topic, error)
	UpdateTopic(*api.Topic) error
	DeleteTopic(topicID ulid.ULID) error
}

Directories

Path Synopsis
Package errors implements standard database read/write errors for the store package.
Package errors implements standard database read/write errors for the store package.

Jump to

Keyboard shortcuts

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