Documentation
¶
Index ¶
- type MockStreamingConnector
- func (m *MockStreamingConnector) AddRow(meterSlug string, row meter.MeterQueryRow)
- func (m *MockStreamingConnector) AddSimpleEvent(meterSlug string, value float64, at time.Time)
- func (m *MockStreamingConnector) BatchInsert(ctx context.Context, events []streaming.RawEvent) error
- func (m *MockStreamingConnector) CountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)
- func (c *MockStreamingConnector) CreateNamespace(ctx context.Context, namespace string) error
- func (c *MockStreamingConnector) DeleteNamespace(ctx context.Context, namespace string) error
- func (m *MockStreamingConnector) ListEvents(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]streaming.RawEvent, error)
- func (m *MockStreamingConnector) ListEventsV2(ctx context.Context, params streaming.ListEventsV2Params) ([]streaming.RawEvent, error)
- func (m *MockStreamingConnector) ListMeterSubjects(ctx context.Context, namespace string, meter meter.Meter, ...) ([]string, error)
- func (m *MockStreamingConnector) QueryMeter(ctx context.Context, namespace string, mm meter.Meter, ...) ([]meter.MeterQueryRow, error)
- func (m *MockStreamingConnector) Reset()
- func (m *MockStreamingConnector) SetSimpleEvents(meterSlug string, fn func(events []SimpleEvent) []SimpleEvent)
- func (m *MockStreamingConnector) ValidateJSONPath(ctx context.Context, jsonPath string) (bool, error)
- 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 meter.MeterQueryRow)
func (*MockStreamingConnector) AddSimpleEvent ¶
func (m *MockStreamingConnector) AddSimpleEvent(meterSlug string, value float64, at time.Time)
func (*MockStreamingConnector) BatchInsert ¶
func (*MockStreamingConnector) CountEvents ¶
func (m *MockStreamingConnector) CountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)
func (*MockStreamingConnector) CreateNamespace ¶
func (c *MockStreamingConnector) CreateNamespace(ctx context.Context, namespace string) error
func (*MockStreamingConnector) DeleteNamespace ¶
func (c *MockStreamingConnector) DeleteNamespace(ctx context.Context, namespace string) error
func (*MockStreamingConnector) ListEvents ¶
func (m *MockStreamingConnector) ListEvents(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]streaming.RawEvent, error)
func (*MockStreamingConnector) ListEventsV2 ¶
func (m *MockStreamingConnector) ListEventsV2(ctx context.Context, params streaming.ListEventsV2Params) ([]streaming.RawEvent, error)
func (*MockStreamingConnector) ListMeterSubjects ¶
func (m *MockStreamingConnector) ListMeterSubjects(ctx context.Context, namespace string, meter meter.Meter, params streaming.ListMeterSubjectsParams) ([]string, error)
func (*MockStreamingConnector) QueryMeter ¶
func (m *MockStreamingConnector) QueryMeter(ctx context.Context, namespace string, mm meter.Meter, params streaming.QueryParams) ([]meter.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) Reset ¶
func (m *MockStreamingConnector) Reset()
func (*MockStreamingConnector) SetSimpleEvents ¶
func (m *MockStreamingConnector) SetSimpleEvents(meterSlug string, fn func(events []SimpleEvent) []SimpleEvent)
func (*MockStreamingConnector) ValidateJSONPath ¶
Click to show internal directories.
Click to hide internal directories.