Documentation ¶
Index ¶
- type PromAPIMock
- func (o *PromAPIMock) AlertManagers(ctx context.Context) (prom_v1.AlertManagersResult, error)
- func (o *PromAPIMock) AlwaysReturnEmpty()
- func (o *PromAPIMock) CleanTombstones(ctx context.Context) error
- func (o *PromAPIMock) Config(ctx context.Context) (prom_v1.ConfigResult, error)
- func (o *PromAPIMock) DeleteSeries(ctx context.Context, matches []string, startTime time.Time, endTime time.Time) error
- func (o *PromAPIMock) Flags(ctx context.Context) (prom_v1.FlagsResult, error)
- func (o *PromAPIMock) LabelValues(ctx context.Context, label string) (model.LabelValues, error)
- func (o *PromAPIMock) Query(ctx context.Context, query string, ts time.Time) (model.Value, error)
- func (o *PromAPIMock) QueryRange(ctx context.Context, query string, r prom_v1.Range) (model.Value, error)
- func (o *PromAPIMock) Series(ctx context.Context, matches []string, startTime time.Time, endTime time.Time) ([]model.LabelSet, error)
- func (o *PromAPIMock) Snapshot(ctx context.Context, skipHead bool) (prom_v1.SnapshotResult, error)
- func (o *PromAPIMock) SpyArgumentsAndReturnEmpty(fn func(args mock.Arguments))
- func (o *PromAPIMock) Targets(ctx context.Context) (prom_v1.TargetsResult, error)
- type PromClientMock
- func (o *PromClientMock) FetchHistogramRange(metricName, labels, grouping string, q *prometheus.BaseMetricsQuery) prometheus.Histogram
- func (o *PromClientMock) FetchRange(metricName, labels, grouping, aggregator string, ...) *prometheus.Metric
- func (o *PromClientMock) FetchRateRange(metricName, labels, grouping string, q *prometheus.BaseMetricsQuery) *prometheus.Metric
- func (o *PromClientMock) GetAllRequestRates(namespace, ratesInterval string, queryTime time.Time) (model.Vector, error)
- func (o *PromClientMock) GetAppRequestRates(namespace, app, ratesInterval string, queryTime time.Time) (model.Vector, model.Vector, error)
- func (o *PromClientMock) GetConfiguration() (prom_v1.ConfigResult, error)
- func (o *PromClientMock) GetFlags() (prom_v1.FlagsResult, error)
- func (o *PromClientMock) GetMetrics(query *prometheus.IstioMetricsQuery) prometheus.Metrics
- func (o *PromClientMock) GetMetricsForLabels(labels []string) ([]string, error)
- func (o *PromClientMock) GetNamespaceServicesRequestRates(namespace, ratesInterval string, queryTime time.Time) (model.Vector, error)
- func (o *PromClientMock) GetServiceRequestRates(namespace, service, ratesInterval string, queryTime time.Time) (model.Vector, error)
- func (o *PromClientMock) GetWorkloadRequestRates(namespace, workload, ratesInterval string, queryTime time.Time) (model.Vector, model.Vector, error)
- func (o *PromClientMock) MockAppRequestRates(namespace, app string, in, out model.Vector)
- func (o *PromClientMock) MockEmptyMetricsDiscovery()
- func (o *PromClientMock) MockServiceRequestRates(namespace, service string, in model.Vector)
- func (o *PromClientMock) MockWorkloadRequestRates(namespace, wkld string, in, out model.Vector)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PromAPIMock ¶
PromAPIMock for mocking Prometheus API
func (*PromAPIMock) AlertManagers ¶ added in v0.15.0
func (o *PromAPIMock) AlertManagers(ctx context.Context) (prom_v1.AlertManagersResult, error)
func (*PromAPIMock) AlwaysReturnEmpty ¶
func (o *PromAPIMock) AlwaysReturnEmpty()
AlwaysReturnEmpty mocks all possible queries to return empty result
func (*PromAPIMock) CleanTombstones ¶ added in v0.15.0
func (o *PromAPIMock) CleanTombstones(ctx context.Context) error
func (*PromAPIMock) Config ¶ added in v0.15.0
func (o *PromAPIMock) Config(ctx context.Context) (prom_v1.ConfigResult, error)
func (*PromAPIMock) DeleteSeries ¶ added in v0.15.0
func (*PromAPIMock) Flags ¶ added in v0.15.0
func (o *PromAPIMock) Flags(ctx context.Context) (prom_v1.FlagsResult, error)
func (*PromAPIMock) LabelValues ¶
func (o *PromAPIMock) LabelValues(ctx context.Context, label string) (model.LabelValues, error)
func (*PromAPIMock) QueryRange ¶
func (*PromAPIMock) Snapshot ¶ added in v0.15.0
func (o *PromAPIMock) Snapshot(ctx context.Context, skipHead bool) (prom_v1.SnapshotResult, error)
func (*PromAPIMock) SpyArgumentsAndReturnEmpty ¶
func (o *PromAPIMock) SpyArgumentsAndReturnEmpty(fn func(args mock.Arguments))
SpyArgumentsAndReturnEmpty mocks all possible queries to return empty result, allowing to spy arguments through input callback
func (*PromAPIMock) Targets ¶ added in v0.15.0
func (o *PromAPIMock) Targets(ctx context.Context) (prom_v1.TargetsResult, error)
type PromClientMock ¶
func (*PromClientMock) FetchHistogramRange ¶ added in v0.12.0
func (o *PromClientMock) FetchHistogramRange(metricName, labels, grouping string, q *prometheus.BaseMetricsQuery) prometheus.Histogram
func (*PromClientMock) FetchRange ¶ added in v0.14.0
func (o *PromClientMock) FetchRange(metricName, labels, grouping, aggregator string, q *prometheus.BaseMetricsQuery) *prometheus.Metric
func (*PromClientMock) FetchRateRange ¶ added in v0.12.0
func (o *PromClientMock) FetchRateRange(metricName, labels, grouping string, q *prometheus.BaseMetricsQuery) *prometheus.Metric
func (*PromClientMock) GetAllRequestRates ¶ added in v0.6.0
func (*PromClientMock) GetAppRequestRates ¶ added in v0.6.0
func (*PromClientMock) GetConfiguration ¶ added in v0.15.0
func (o *PromClientMock) GetConfiguration() (prom_v1.ConfigResult, error)
func (*PromClientMock) GetFlags ¶ added in v0.15.0
func (o *PromClientMock) GetFlags() (prom_v1.FlagsResult, error)
func (*PromClientMock) GetMetrics ¶ added in v0.12.0
func (o *PromClientMock) GetMetrics(query *prometheus.IstioMetricsQuery) prometheus.Metrics
func (*PromClientMock) GetMetricsForLabels ¶ added in v0.17.0
func (o *PromClientMock) GetMetricsForLabels(labels []string) ([]string, error)
func (*PromClientMock) GetNamespaceServicesRequestRates ¶
func (*PromClientMock) GetServiceRequestRates ¶
func (*PromClientMock) GetWorkloadRequestRates ¶ added in v0.6.0
func (*PromClientMock) MockAppRequestRates ¶ added in v0.13.0
func (o *PromClientMock) MockAppRequestRates(namespace, app string, in, out model.Vector)
MockAppRequestRates mocks GetAppRequestRates for given namespace and app, returning in & out vectors
func (*PromClientMock) MockEmptyMetricsDiscovery ¶ added in v0.17.0
func (o *PromClientMock) MockEmptyMetricsDiscovery()
MockEmptyMetricsDiscovery mocks GetMetricsForLabels (for runtimes metrics discovery) as being empty
func (*PromClientMock) MockServiceRequestRates ¶ added in v0.13.0
func (o *PromClientMock) MockServiceRequestRates(namespace, service string, in model.Vector)
MockServiceRequestRates mocks GetServiceRequestRates for given namespace and service, returning in vector
func (*PromClientMock) MockWorkloadRequestRates ¶ added in v0.13.0
func (o *PromClientMock) MockWorkloadRequestRates(namespace, wkld string, in, out model.Vector)
MockWorkloadRequestRates mocks GetWorkloadRequestRates for given namespace and workload, returning in & out vectors