eventstore

package
v0.0.0-...-4d12b9b Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: AGPL-3.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DatasetLogs        store.Dataset = "logs"
	DatasetAlerts      store.Dataset = "alerts"
	DatasetStats       store.Dataset = "statistics"
	DatasetUserHistory store.Dataset = "user_profile_history"
)

Variables

This section is empty.

Functions

func SupportsTextSearch

func SupportsTextSearch(d store.Dataset) bool

Types

type Store

type Store struct {
	store.Store
	// contains filtered or unexported fields
}

func New

func New() (*Store, error)

func (*Store) Close

func (s *Store) Close()

func (*Store) DescribeFields

func (s *Store) DescribeFields(ctx context.Context, sc store.Scope) ([]store.Field, error)

DescribeFields is the store's own, with a cache in front. Listing the fields of a dataset reads the JSON columns of the table to find the paths inside them, which on a big table takes longer than the callers wait, and the answer hardly changes. So it is computed once for everyone asking at the same moment, kept for ten minutes, and an old copy is served at once while a fresh one is worked out. A caller that stops waiting does not stop the work: the next one finds it done.

func (*Store) GetAdmin

func (s *Store) GetAdmin() store.Reader

func (*Store) GetReader

func (s *Store) GetReader() store.Reader

func (*Store) GetWritter

func (s *Store) GetWritter() store.Reader

func (*Store) PurgeTenant

func (s *Store) PurgeTenant(ctx context.Context, tenantID string) error

PurgeTenant deletes all rows scoped to the given tenant across every dataset table. ClickHouse mutation, not synchronous — the ALTER returns once accepted and the rows disappear as the mutation runs.

tenantID must be a UUID string (caller passes uuid.UUID.String()); it is inlined into the SQL because ClickHouse does not bind parameters inside ALTER ... DELETE mutation expressions. The UUID shape makes inlining safe.

func (*Store) Query

func (s *Store) Query(ctx context.Context, sql string) ([]json.RawMessage, error)

makes sql queries into the reader storage

func (*Store) TableName

func (s *Store) TableName(d store.Dataset) string

Jump to

Keyboard shortcuts

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