github.com/onflow/flow-go@v0.33.17/module/mock/transaction_metrics.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 mock "github.com/stretchr/testify/mock" 8 9 time "time" 10 ) 11 12 // TransactionMetrics is an autogenerated mock type for the TransactionMetrics type 13 type TransactionMetrics struct { 14 mock.Mock 15 } 16 17 // TransactionExecuted provides a mock function with given fields: txID, when 18 func (_m *TransactionMetrics) TransactionExecuted(txID flow.Identifier, when time.Time) { 19 _m.Called(txID, when) 20 } 21 22 // TransactionExpired provides a mock function with given fields: txID 23 func (_m *TransactionMetrics) TransactionExpired(txID flow.Identifier) { 24 _m.Called(txID) 25 } 26 27 // TransactionFinalized provides a mock function with given fields: txID, when 28 func (_m *TransactionMetrics) TransactionFinalized(txID flow.Identifier, when time.Time) { 29 _m.Called(txID, when) 30 } 31 32 // TransactionReceived provides a mock function with given fields: txID, when 33 func (_m *TransactionMetrics) TransactionReceived(txID flow.Identifier, when time.Time) { 34 _m.Called(txID, when) 35 } 36 37 // TransactionResultFetched provides a mock function with given fields: dur, size 38 func (_m *TransactionMetrics) TransactionResultFetched(dur time.Duration, size int) { 39 _m.Called(dur, size) 40 } 41 42 // TransactionSubmissionFailed provides a mock function with given fields: 43 func (_m *TransactionMetrics) TransactionSubmissionFailed() { 44 _m.Called() 45 } 46 47 type mockConstructorTestingTNewTransactionMetrics interface { 48 mock.TestingT 49 Cleanup(func()) 50 } 51 52 // NewTransactionMetrics creates a new instance of TransactionMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 53 func NewTransactionMetrics(t mockConstructorTestingTNewTransactionMetrics) *TransactionMetrics { 54 mock := &TransactionMetrics{} 55 mock.Mock.Test(t) 56 57 t.Cleanup(func() { mock.AssertExpectations(t) }) 58 59 return mock 60 }