Documentation ¶
Index ¶
- type MockExporter
- type MockExporter_Disable_Call
- type MockExporter_Enable_Call
- type MockExporter_Enabled_Call
- type MockExporter_Expecter
- type MockExporter_Start_Call
- type MockHTTPClient
- type MockHTTPClient_Do_Call
- func (_c *MockHTTPClient_Do_Call) Return(_a0 *http.Response, _a1 error) *MockHTTPClient_Do_Call
- func (_c *MockHTTPClient_Do_Call) Run(run func(req *http.Request)) *MockHTTPClient_Do_Call
- func (_c *MockHTTPClient_Do_Call) RunAndReturn(run func(*http.Request) (*http.Response, error)) *MockHTTPClient_Do_Call
- type MockHTTPClient_Expecter
- type MockMetricMapper
- type MockMetricMapper_Expecter
- type MockMetricMapper_Map_Call
- func (_c *MockMetricMapper_Map_Call) Return(_a0 *pb.MetricsBatch) *MockMetricMapper_Map_Call
- func (_c *MockMetricMapper_Map_Call) Run(run func(metrics []exporter.MetricFamilyMap)) *MockMetricMapper_Map_Call
- func (_c *MockMetricMapper_Map_Call) RunAndReturn(run func([]exporter.MetricFamilyMap) *pb.MetricsBatch) *MockMetricMapper_Map_Call
- type MockScraper
- type MockScraper_Expecter
- type MockScraper_Scrape_Call
- func (_c *MockScraper_Scrape_Call) Return(_a0 []exporter.MetricFamilyMap, _a1 error) *MockScraper_Scrape_Call
- func (_c *MockScraper_Scrape_Call) Run(run func(ctx context.Context, urls []string)) *MockScraper_Scrape_Call
- func (_c *MockScraper_Scrape_Call) RunAndReturn(run func(context.Context, []string) ([]exporter.MetricFamilyMap, error)) *MockScraper_Scrape_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockExporter ¶
MockExporter is an autogenerated mock type for the Exporter type
func NewMockExporter ¶
func NewMockExporter(t interface { mock.TestingT Cleanup(func()) }) *MockExporter
NewMockExporter creates a new instance of MockExporter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockExporter) Disable ¶
func (_m *MockExporter) Disable()
Disable provides a mock function with given fields:
func (*MockExporter) EXPECT ¶
func (_m *MockExporter) EXPECT() *MockExporter_Expecter
func (*MockExporter) Enable ¶
func (_m *MockExporter) Enable()
Enable provides a mock function with given fields:
func (*MockExporter) Enabled ¶
func (_m *MockExporter) Enabled() bool
Enabled provides a mock function with given fields:
type MockExporter_Disable_Call ¶
MockExporter_Disable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Disable'
func (*MockExporter_Disable_Call) Return ¶
func (_c *MockExporter_Disable_Call) Return() *MockExporter_Disable_Call
func (*MockExporter_Disable_Call) Run ¶
func (_c *MockExporter_Disable_Call) Run(run func()) *MockExporter_Disable_Call
func (*MockExporter_Disable_Call) RunAndReturn ¶
func (_c *MockExporter_Disable_Call) RunAndReturn(run func()) *MockExporter_Disable_Call
type MockExporter_Enable_Call ¶
MockExporter_Enable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Enable'
func (*MockExporter_Enable_Call) Return ¶
func (_c *MockExporter_Enable_Call) Return() *MockExporter_Enable_Call
func (*MockExporter_Enable_Call) Run ¶
func (_c *MockExporter_Enable_Call) Run(run func()) *MockExporter_Enable_Call
func (*MockExporter_Enable_Call) RunAndReturn ¶
func (_c *MockExporter_Enable_Call) RunAndReturn(run func()) *MockExporter_Enable_Call
type MockExporter_Enabled_Call ¶
MockExporter_Enabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Enabled'
func (*MockExporter_Enabled_Call) Return ¶
func (_c *MockExporter_Enabled_Call) Return(_a0 bool) *MockExporter_Enabled_Call
func (*MockExporter_Enabled_Call) Run ¶
func (_c *MockExporter_Enabled_Call) Run(run func()) *MockExporter_Enabled_Call
func (*MockExporter_Enabled_Call) RunAndReturn ¶
func (_c *MockExporter_Enabled_Call) RunAndReturn(run func() bool) *MockExporter_Enabled_Call
type MockExporter_Expecter ¶
type MockExporter_Expecter struct {
// contains filtered or unexported fields
}
func (*MockExporter_Expecter) Disable ¶
func (_e *MockExporter_Expecter) Disable() *MockExporter_Disable_Call
Disable is a helper method to define mock.On call
func (*MockExporter_Expecter) Enable ¶
func (_e *MockExporter_Expecter) Enable() *MockExporter_Enable_Call
Enable is a helper method to define mock.On call
func (*MockExporter_Expecter) Enabled ¶
func (_e *MockExporter_Expecter) Enabled() *MockExporter_Enabled_Call
Enabled is a helper method to define mock.On call
func (*MockExporter_Expecter) Start ¶
func (_e *MockExporter_Expecter) Start(ctx interface{}) *MockExporter_Start_Call
Start is a helper method to define mock.On call
- ctx context.Context
type MockExporter_Start_Call ¶
MockExporter_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
func (*MockExporter_Start_Call) Return ¶
func (_c *MockExporter_Start_Call) Return(_a0 error) *MockExporter_Start_Call
func (*MockExporter_Start_Call) Run ¶
func (_c *MockExporter_Start_Call) Run(run func(ctx context.Context)) *MockExporter_Start_Call
func (*MockExporter_Start_Call) RunAndReturn ¶
func (_c *MockExporter_Start_Call) RunAndReturn(run func(context.Context) error) *MockExporter_Start_Call
type MockHTTPClient ¶
MockHTTPClient is an autogenerated mock type for the HTTPClient type
func NewMockHTTPClient ¶
func NewMockHTTPClient(t interface { mock.TestingT Cleanup(func()) }) *MockHTTPClient
NewMockHTTPClient creates a new instance of MockHTTPClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockHTTPClient) EXPECT ¶
func (_m *MockHTTPClient) EXPECT() *MockHTTPClient_Expecter
type MockHTTPClient_Do_Call ¶
MockHTTPClient_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do'
func (*MockHTTPClient_Do_Call) Return ¶
func (_c *MockHTTPClient_Do_Call) Return(_a0 *http.Response, _a1 error) *MockHTTPClient_Do_Call
func (*MockHTTPClient_Do_Call) Run ¶
func (_c *MockHTTPClient_Do_Call) Run(run func(req *http.Request)) *MockHTTPClient_Do_Call
func (*MockHTTPClient_Do_Call) RunAndReturn ¶
func (_c *MockHTTPClient_Do_Call) RunAndReturn(run func(*http.Request) (*http.Response, error)) *MockHTTPClient_Do_Call
type MockHTTPClient_Expecter ¶
type MockHTTPClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockHTTPClient_Expecter) Do ¶
func (_e *MockHTTPClient_Expecter) Do(req interface{}) *MockHTTPClient_Do_Call
Do is a helper method to define mock.On call
- req *http.Request
type MockMetricMapper ¶
MockMetricMapper is an autogenerated mock type for the MetricMapper type
func NewMockMetricMapper ¶
func NewMockMetricMapper(t interface { mock.TestingT Cleanup(func()) }) *MockMetricMapper
NewMockMetricMapper creates a new instance of MockMetricMapper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockMetricMapper) EXPECT ¶
func (_m *MockMetricMapper) EXPECT() *MockMetricMapper_Expecter
func (*MockMetricMapper) Map ¶
func (_m *MockMetricMapper) Map(metrics []exporter.MetricFamilyMap) *pb.MetricsBatch
Map provides a mock function with given fields: metrics
type MockMetricMapper_Expecter ¶
type MockMetricMapper_Expecter struct {
// contains filtered or unexported fields
}
func (*MockMetricMapper_Expecter) Map ¶
func (_e *MockMetricMapper_Expecter) Map(metrics interface{}) *MockMetricMapper_Map_Call
Map is a helper method to define mock.On call
- metrics []exporter.MetricFamilyMap
type MockMetricMapper_Map_Call ¶
MockMetricMapper_Map_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Map'
func (*MockMetricMapper_Map_Call) Return ¶
func (_c *MockMetricMapper_Map_Call) Return(_a0 *pb.MetricsBatch) *MockMetricMapper_Map_Call
func (*MockMetricMapper_Map_Call) Run ¶
func (_c *MockMetricMapper_Map_Call) Run(run func(metrics []exporter.MetricFamilyMap)) *MockMetricMapper_Map_Call
func (*MockMetricMapper_Map_Call) RunAndReturn ¶
func (_c *MockMetricMapper_Map_Call) RunAndReturn(run func([]exporter.MetricFamilyMap) *pb.MetricsBatch) *MockMetricMapper_Map_Call
type MockScraper ¶
MockScraper is an autogenerated mock type for the Scraper type
func NewMockScraper ¶
func NewMockScraper(t interface { mock.TestingT Cleanup(func()) }) *MockScraper
NewMockScraper creates a new instance of MockScraper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockScraper) EXPECT ¶
func (_m *MockScraper) EXPECT() *MockScraper_Expecter
func (*MockScraper) Scrape ¶
func (_m *MockScraper) Scrape(ctx context.Context, urls []string) ([]exporter.MetricFamilyMap, error)
Scrape provides a mock function with given fields: ctx, urls
type MockScraper_Expecter ¶
type MockScraper_Expecter struct {
// contains filtered or unexported fields
}
func (*MockScraper_Expecter) Scrape ¶
func (_e *MockScraper_Expecter) Scrape(ctx interface{}, urls interface{}) *MockScraper_Scrape_Call
Scrape is a helper method to define mock.On call
- ctx context.Context
- urls []string
type MockScraper_Scrape_Call ¶
MockScraper_Scrape_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Scrape'
func (*MockScraper_Scrape_Call) Return ¶
func (_c *MockScraper_Scrape_Call) Return(_a0 []exporter.MetricFamilyMap, _a1 error) *MockScraper_Scrape_Call
func (*MockScraper_Scrape_Call) Run ¶
func (_c *MockScraper_Scrape_Call) Run(run func(ctx context.Context, urls []string)) *MockScraper_Scrape_Call
func (*MockScraper_Scrape_Call) RunAndReturn ¶
func (_c *MockScraper_Scrape_Call) RunAndReturn(run func(context.Context, []string) ([]exporter.MetricFamilyMap, error)) *MockScraper_Scrape_Call