store

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: BSD-3-Clause Imports: 9 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 EventHashStore added in v0.11.0

type EventHashStore interface {
	// Indash is a combination of "Index" and "Hash"
	Indash(topicID ulid.ULID, hash []byte, eventID rlid.RLID) error
	Unhash(topicID ulid.ULID, hash []byte) (*api.EventWrapper, error)
	LoadIndash(topicID ulid.ULID) iterator.IndashIterator
	ClearIndash(topicID ulid.ULID) error
}

type EventStore

type EventStore interface {
	Store
	EventHashStore
	Insert(*api.EventWrapper) error
	List(topicID ulid.ULID) iterator.EventIterator
	Retrieve(topicID ulid.ULID, eventID rlid.RLID) (*api.EventWrapper, error)
	Destroy(topicID ulid.ULID) error
}

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
	TopicInfoStore
}

type Store

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

type TopicInfoStore added in v0.9.0

type TopicInfoStore interface {
	ListAllTopics() iterator.TopicIterator
	TopicInfo(topicID ulid.ULID) (*api.TopicInfo, error)
	UpdateTopicInfo(*api.TopicInfo) error
}

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)
	LookupTopicID(name string, projectID ulid.ULID) (topicID ulid.ULID, err 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