github.com/koko1123/flow-go-1@v0.29.6/module/mock/resolver_metrics.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 mock "github.com/stretchr/testify/mock" 7 8 time "time" 9 ) 10 11 // ResolverMetrics is an autogenerated mock type for the ResolverMetrics type 12 type ResolverMetrics struct { 13 mock.Mock 14 } 15 16 // DNSLookupDuration provides a mock function with given fields: duration 17 func (_m *ResolverMetrics) DNSLookupDuration(duration time.Duration) { 18 _m.Called(duration) 19 } 20 21 // OnDNSCacheHit provides a mock function with given fields: 22 func (_m *ResolverMetrics) OnDNSCacheHit() { 23 _m.Called() 24 } 25 26 // OnDNSCacheInvalidated provides a mock function with given fields: 27 func (_m *ResolverMetrics) OnDNSCacheInvalidated() { 28 _m.Called() 29 } 30 31 // OnDNSCacheMiss provides a mock function with given fields: 32 func (_m *ResolverMetrics) OnDNSCacheMiss() { 33 _m.Called() 34 } 35 36 // OnDNSLookupRequestDropped provides a mock function with given fields: 37 func (_m *ResolverMetrics) OnDNSLookupRequestDropped() { 38 _m.Called() 39 } 40 41 type mockConstructorTestingTNewResolverMetrics interface { 42 mock.TestingT 43 Cleanup(func()) 44 } 45 46 // NewResolverMetrics creates a new instance of ResolverMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 47 func NewResolverMetrics(t mockConstructorTestingTNewResolverMetrics) *ResolverMetrics { 48 mock := &ResolverMetrics{} 49 mock.Mock.Test(t) 50 51 t.Cleanup(func() { mock.AssertExpectations(t) }) 52 53 return mock 54 }