Documentation
¶
Index ¶
- func GetMeterViewName(database string, namespace string, meterSlug string) string
- type Connector
- func (c *Connector) BatchInsert(ctx context.Context, rawEvents []streaming.RawEvent) error
- func (c *Connector) CountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)
- func (c *Connector) CreateMeter(ctx context.Context, namespace string, meter models.Meter) error
- func (c *Connector) CreateNamespace(ctx context.Context, namespace string) error
- func (c *Connector) DeleteMeter(ctx context.Context, namespace string, meter models.Meter) error
- func (c *Connector) DeleteNamespace(ctx context.Context, namespace string) error
- func (c *Connector) ListEvents(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]api.IngestedEvent, error)
- func (c *Connector) ListMeterSubjects(ctx context.Context, namespace string, meter models.Meter, ...) ([]string, error)
- func (c *Connector) QueryMeter(ctx context.Context, namespace string, meter models.Meter, ...) ([]models.MeterQueryRow, error)
- type ConnectorConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 (*Connector) CountEvents ¶
func (c *Connector) CountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)
func (*Connector) CreateMeter ¶
func (*Connector) CreateNamespace ¶
func (*Connector) DeleteMeter ¶
func (*Connector) DeleteNamespace ¶
func (*Connector) ListEvents ¶
func (c *Connector) ListEvents(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]api.IngestedEvent, error)
func (*Connector) ListMeterSubjects ¶
func (*Connector) QueryMeter ¶
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
Click to show internal directories.
Click to hide internal directories.