Documentation ¶
Index ¶
- type PromAPIMock
- func (o *PromAPIMock) AlwaysReturnEmpty()
- 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 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) SpyArgumentsAndReturnEmpty(fn func(args mock.Arguments))
- type PromClientMock
- func (o *PromClientMock) GetAllRequestRates(namespace, ratesInterval string) (model.Vector, error)
- func (o *PromClientMock) GetAppRequestRates(namespace, app, ratesInterval string) (model.Vector, model.Vector, error)
- func (o *PromClientMock) GetNamespaceServicesRequestRates(namespace, ratesInterval string) (model.Vector, error)
- func (o *PromClientMock) GetServiceHealth(namespace, servicename string, ports []int32) (prometheus.EnvoyServiceHealth, error)
- func (o *PromClientMock) GetServiceRequestRates(namespace, service, ratesInterval string) (model.Vector, error)
- func (o *PromClientMock) GetSourceWorkloads(namespace, servicename string) (map[string][]prometheus.Workload, error)
- func (o *PromClientMock) GetWorkloadRequestRates(namespace, workload, ratesInterval string) (model.Vector, model.Vector, error)
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) AlwaysReturnEmpty ¶
func (o *PromAPIMock) AlwaysReturnEmpty()
AlwaysReturnEmpty mocks all possible queries to return empty result
func (*PromAPIMock) LabelValues ¶
func (o *PromAPIMock) LabelValues(ctx context.Context, label string) (model.LabelValues, error)
func (*PromAPIMock) QueryRange ¶
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
type PromClientMock ¶
func (*PromClientMock) GetAllRequestRates ¶ added in v0.6.0
func (o *PromClientMock) GetAllRequestRates(namespace, ratesInterval string) (model.Vector, error)
func (*PromClientMock) GetAppRequestRates ¶ added in v0.6.0
func (*PromClientMock) GetNamespaceServicesRequestRates ¶
func (o *PromClientMock) GetNamespaceServicesRequestRates(namespace, ratesInterval string) (model.Vector, error)
func (*PromClientMock) GetServiceHealth ¶
func (o *PromClientMock) GetServiceHealth(namespace, servicename string, ports []int32) (prometheus.EnvoyServiceHealth, error)
func (*PromClientMock) GetServiceRequestRates ¶
func (o *PromClientMock) GetServiceRequestRates(namespace, service, ratesInterval string) (model.Vector, error)
func (*PromClientMock) GetSourceWorkloads ¶ added in v0.6.0
func (o *PromClientMock) GetSourceWorkloads(namespace, servicename string) (map[string][]prometheus.Workload, error)
func (*PromClientMock) GetWorkloadRequestRates ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.