Documentation ¶
Overview ¶
Package prometheus is a generated GoMock package.
Index ¶
- type Client
- type MockClient
- func (m *MockClient) AwaitScrapeInterval(ctx context.Context)
- func (m *MockClient) EXPECT() *MockClientMockRecorder
- func (m *MockClient) GetMaxCPUByPodName(ctx context.Context, podName string) (float64, error)
- func (m *MockClient) GetMaxMemoryByPodName(ctx context.Context, podName string) (float64, error)
- type MockClientMockRecorder
- type PrometheusQueryResponse
- type PrometheusQueryResponseData
- type PrometheusQueryResponseDataResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { AwaitScrapeInterval(ctx context.Context) GetMaxMemoryByPodName(ctx context.Context, podName string) (max float64, err error) GetMaxCPUByPodName(ctx context.Context, podName string) (max float64, err error) }
Client is the interface for communicating with prometheus
func NewLoggingClient ¶
NewLoggingClient returns a new instance of a logging Client.
func NewMetricsClient ¶
func NewMetricsClient(c Client, requestCount metrics.Counter, requestLatency metrics.Histogram) Client
NewMetricsClient returns a new instance of a metrics Client.
func NewTracingClient ¶
NewTracingClient returns a new instance of a tracing Client.
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance
func (*MockClient) AwaitScrapeInterval ¶
func (m *MockClient) AwaitScrapeInterval(ctx context.Context)
AwaitScrapeInterval mocks base method
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockClient) GetMaxCPUByPodName ¶
GetMaxCPUByPodName mocks base method
func (*MockClient) GetMaxMemoryByPodName ¶
GetMaxMemoryByPodName mocks base method
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient
func (*MockClientMockRecorder) AwaitScrapeInterval ¶
func (mr *MockClientMockRecorder) AwaitScrapeInterval(ctx interface{}) *gomock.Call
AwaitScrapeInterval indicates an expected call of AwaitScrapeInterval
func (*MockClientMockRecorder) GetMaxCPUByPodName ¶
func (mr *MockClientMockRecorder) GetMaxCPUByPodName(ctx, podName interface{}) *gomock.Call
GetMaxCPUByPodName indicates an expected call of GetMaxCPUByPodName
func (*MockClientMockRecorder) GetMaxMemoryByPodName ¶
func (mr *MockClientMockRecorder) GetMaxMemoryByPodName(ctx, podName interface{}) *gomock.Call
GetMaxMemoryByPodName indicates an expected call of GetMaxMemoryByPodName
type PrometheusQueryResponse ¶
type PrometheusQueryResponse struct { Status string `json:"status"` Data PrometheusQueryResponseData `json:"data"` }
type PrometheusQueryResponseData ¶
type PrometheusQueryResponseData struct { ResultType string `json:"resultType"` Result []PrometheusQueryResponseDataResult `json:"result"` }
PrometheusQueryResponseData is used to unmarshal the response from a prometheus query
type PrometheusQueryResponseDataResult ¶
type PrometheusQueryResponseDataResult struct { Metric interface{} `json:"metric"` Value []interface{} `json:"value"` }
PrometheusQueryResponseDataResult is used to unmarshal the response from a prometheus query