streaming

package
v1.0.0-beta.199 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector interface {
	namespace.Handler

	CountEvents(ctx context.Context, namespace string, params CountEventsParams) ([]CountEventRow, error)
	ListEvents(ctx context.Context, namespace string, params ListEventsParams) ([]api.IngestedEvent, error)
	CreateMeter(ctx context.Context, namespace string, meter meter.Meter) error
	DeleteMeter(ctx context.Context, namespace string, meter meter.Meter) error
	QueryMeter(ctx context.Context, namespace string, meter meter.Meter, params QueryParams) ([]meter.MeterQueryRow, error)
	ListMeterSubjects(ctx context.Context, namespace string, meter meter.Meter, params ListMeterSubjectsParams) ([]string, error)
	BatchInsert(ctx context.Context, events []RawEvent) error
	ValidateJSONPath(ctx context.Context, jsonPath string) (bool, error)
}

type CountEventRow

type CountEventRow struct {
	Count   uint64
	Subject string
	IsError bool
}

CountEventRow represents a row in the count events response.

type CountEventsParams

type CountEventsParams struct {
	From time.Time
}

type ListEventsParams

type ListEventsParams struct {
	ClientID       *string
	From           time.Time
	To             *time.Time
	IngestedAtFrom *time.Time
	IngestedAtTo   *time.Time
	ID             *string
	Subject        *string
	HasError       *bool
	Limit          int
}

type ListMeterSubjectsParams

type ListMeterSubjectsParams struct {
	From *time.Time
	To   *time.Time
}

ListMeterSubjectsParams is a parameter object for listing subjects.

func (ListMeterSubjectsParams) Validate

func (p ListMeterSubjectsParams) Validate() error

Validate validates the list meters parameters.

type QueryParams

type QueryParams struct {
	ClientID       *string
	From           *time.Time
	To             *time.Time
	FilterSubject  []string
	FilterGroupBy  map[string][]string
	GroupBy        []string
	WindowSize     *meter.WindowSize
	WindowTimeZone *time.Location
}

func (*QueryParams) Validate

func (p *QueryParams) Validate() error

Validate validates query params focusing on `from` and `to` being aligned with query and meter window sizes

type RawEvent

type RawEvent struct {
	Namespace       string
	ValidationError string
	ID              string
	Type            string
	Source          string
	Subject         string
	Time            time.Time
	Data            string
	IngestedAt      time.Time
	StoredAt        time.Time
}

RawEvent represents a single raw event

Directories

Path Synopsis
clickhouse

Jump to

Keyboard shortcuts

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