-
Notifications
You must be signed in to change notification settings - Fork 175
/
rest_metrics.go
52 lines (39 loc) · 1.68 KB
/
rest_metrics.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Code generated by mockery v2.21.4. DO NOT EDIT.
package mock
import (
context "context"
metrics "github.com/slok/go-http-metrics/metrics"
mock "github.com/stretchr/testify/mock"
time "time"
)
// RestMetrics is an autogenerated mock type for the RestMetrics type
type RestMetrics struct {
mock.Mock
}
// AddInflightRequests provides a mock function with given fields: ctx, props, quantity
func (_m *RestMetrics) AddInflightRequests(ctx context.Context, props metrics.HTTPProperties, quantity int) {
_m.Called(ctx, props, quantity)
}
// AddTotalRequests provides a mock function with given fields: ctx, method, routeName
func (_m *RestMetrics) AddTotalRequests(ctx context.Context, method string, routeName string) {
_m.Called(ctx, method, routeName)
}
// ObserveHTTPRequestDuration provides a mock function with given fields: ctx, props, duration
func (_m *RestMetrics) ObserveHTTPRequestDuration(ctx context.Context, props metrics.HTTPReqProperties, duration time.Duration) {
_m.Called(ctx, props, duration)
}
// ObserveHTTPResponseSize provides a mock function with given fields: ctx, props, sizeBytes
func (_m *RestMetrics) ObserveHTTPResponseSize(ctx context.Context, props metrics.HTTPReqProperties, sizeBytes int64) {
_m.Called(ctx, props, sizeBytes)
}
type mockConstructorTestingTNewRestMetrics interface {
mock.TestingT
Cleanup(func())
}
// NewRestMetrics creates a new instance of RestMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewRestMetrics(t mockConstructorTestingTNewRestMetrics) *RestMetrics {
mock := &RestMetrics{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}