github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/rest_metrics.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	context "context"
     7  
     8  	metrics "github.com/slok/go-http-metrics/metrics"
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	time "time"
    12  )
    13  
    14  // RestMetrics is an autogenerated mock type for the RestMetrics type
    15  type RestMetrics struct {
    16  	mock.Mock
    17  }
    18  
    19  // AddInflightRequests provides a mock function with given fields: ctx, props, quantity
    20  func (_m *RestMetrics) AddInflightRequests(ctx context.Context, props metrics.HTTPProperties, quantity int) {
    21  	_m.Called(ctx, props, quantity)
    22  }
    23  
    24  // AddTotalRequests provides a mock function with given fields: ctx, method, routeName
    25  func (_m *RestMetrics) AddTotalRequests(ctx context.Context, method string, routeName string) {
    26  	_m.Called(ctx, method, routeName)
    27  }
    28  
    29  // ObserveHTTPRequestDuration provides a mock function with given fields: ctx, props, duration
    30  func (_m *RestMetrics) ObserveHTTPRequestDuration(ctx context.Context, props metrics.HTTPReqProperties, duration time.Duration) {
    31  	_m.Called(ctx, props, duration)
    32  }
    33  
    34  // ObserveHTTPResponseSize provides a mock function with given fields: ctx, props, sizeBytes
    35  func (_m *RestMetrics) ObserveHTTPResponseSize(ctx context.Context, props metrics.HTTPReqProperties, sizeBytes int64) {
    36  	_m.Called(ctx, props, sizeBytes)
    37  }
    38  
    39  type mockConstructorTestingTNewRestMetrics interface {
    40  	mock.TestingT
    41  	Cleanup(func())
    42  }
    43  
    44  // 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.
    45  func NewRestMetrics(t mockConstructorTestingTNewRestMetrics) *RestMetrics {
    46  	mock := &RestMetrics{}
    47  	mock.Mock.Test(t)
    48  
    49  	t.Cleanup(func() { mock.AssertExpectations(t) })
    50  
    51  	return mock
    52  }