materialized_view

package
v1.0.0-beta.192 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMeterViewName

func GetMeterViewName(database string, namespace string, meterSlug string) string

Types

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

Connector implements `ingest.Connector“ and `namespace.Handler interfaces.

func NewConnector

func NewConnector(ctx context.Context, config ConnectorConfig) (*Connector, error)

func (*Connector) BatchInsert

func (c *Connector) BatchInsert(ctx context.Context, rawEvents []streaming.RawEvent) error

func (*Connector) CountEvents

func (c *Connector) CountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)

func (*Connector) CreateMeter

func (c *Connector) CreateMeter(ctx context.Context, namespace string, meter models.Meter) error

func (*Connector) CreateNamespace

func (c *Connector) CreateNamespace(ctx context.Context, namespace string) error

func (*Connector) DeleteMeter

func (c *Connector) DeleteMeter(ctx context.Context, namespace string, meter models.Meter) error

func (*Connector) DeleteNamespace

func (c *Connector) DeleteNamespace(ctx context.Context, namespace string) error

func (*Connector) ListEvents

func (c *Connector) ListEvents(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]api.IngestedEvent, error)

func (*Connector) ListMeterSubjects

func (c *Connector) ListMeterSubjects(ctx context.Context, namespace string, meter models.Meter, params streaming.ListMeterSubjectsParams) ([]string, error)

func (*Connector) QueryMeter

func (c *Connector) QueryMeter(ctx context.Context, namespace string, meter models.Meter, params streaming.QueryParams) ([]models.MeterQueryRow, error)

type ConnectorConfig

type ConnectorConfig struct {
	Logger               *slog.Logger
	ClickHouse           clickhouse.Conn
	Database             string
	EventsTableName      string
	Meters               meter.Repository
	CreateOrReplaceMeter bool
	PopulateMeter        bool
	AsyncInsert          bool
	AsyncInsertWait      bool
	InsertQuerySettings  map[string]string
	QueryRawEvents       bool
}

func (ConnectorConfig) Validate

func (c ConnectorConfig) Validate() error

Jump to

Keyboard shortcuts

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