Documentation
¶
Index ¶
- type MockStreamingConnector
- func (m *MockStreamingConnector) AddRow(meterSlug string, row models.MeterQueryRow)
- func (m *MockStreamingConnector) AddSimpleEvent(meterSlug string, value float64, at time.Time)
- func (m *MockStreamingConnector) CountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)
- func (m *MockStreamingConnector) CreateMeter(ctx context.Context, namespace string, meter *models.Meter) error
- func (m *MockStreamingConnector) DeleteMeter(ctx context.Context, namespace string, meterSlug string) error
- func (m *MockStreamingConnector) ListEvents(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]api.IngestedEvent, error)
- func (m *MockStreamingConnector) ListMeterSubjects(ctx context.Context, namespace string, meterSlug string, from *time.Time, ...) ([]string, error)
- func (m *MockStreamingConnector) QueryMeter(ctx context.Context, namespace string, meterSlug string, ...) ([]models.MeterQueryRow, error)
- func (m *MockStreamingConnector) SetSimpleEvents(meterSlug string, fn func(events []SimpleEvent) []SimpleEvent)
- type SimpleEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockStreamingConnector ¶
type MockStreamingConnector struct {
// contains filtered or unexported fields
}
func NewMockStreamingConnector ¶
func NewMockStreamingConnector(t testing.TB) *MockStreamingConnector
func (*MockStreamingConnector) AddRow ¶
func (m *MockStreamingConnector) AddRow(meterSlug string, row models.MeterQueryRow)
func (*MockStreamingConnector) AddSimpleEvent ¶
func (m *MockStreamingConnector) AddSimpleEvent(meterSlug string, value float64, at time.Time)
func (*MockStreamingConnector) CountEvents ¶
func (m *MockStreamingConnector) CountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)
func (*MockStreamingConnector) CreateMeter ¶
func (*MockStreamingConnector) DeleteMeter ¶
func (*MockStreamingConnector) ListEvents ¶
func (m *MockStreamingConnector) ListEvents(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]api.IngestedEvent, error)
func (*MockStreamingConnector) ListMeterSubjects ¶
func (*MockStreamingConnector) QueryMeter ¶
func (m *MockStreamingConnector) QueryMeter(ctx context.Context, namespace string, meterSlug string, params *streaming.QueryParams) ([]models.MeterQueryRow, error)
Returns the result query set for the given params. If the query set is not found, it will try to approximate the result by aggregating the simple events
func (*MockStreamingConnector) SetSimpleEvents ¶
func (m *MockStreamingConnector) SetSimpleEvents(meterSlug string, fn func(events []SimpleEvent) []SimpleEvent)
Click to show internal directories.
Click to hide internal directories.