github.com/aergoio/aergo@v1.3.1/p2p/p2pmock/mock_metricsman.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: metricsman.go 3 4 // Package p2pmock is a generated GoMock package. 5 package p2pmock 6 7 import ( 8 metric "github.com/aergoio/aergo/p2p/metric" 9 types "github.com/aergoio/aergo/types" 10 gomock "github.com/golang/mock/gomock" 11 reflect "reflect" 12 ) 13 14 // MockMetricsManager is a mock of MetricsManager interface 15 type MockMetricsManager struct { 16 ctrl *gomock.Controller 17 recorder *MockMetricsManagerMockRecorder 18 } 19 20 // MockMetricsManagerMockRecorder is the mock recorder for MockMetricsManager 21 type MockMetricsManagerMockRecorder struct { 22 mock *MockMetricsManager 23 } 24 25 // NewMockMetricsManager creates a new mock instance 26 func NewMockMetricsManager(ctrl *gomock.Controller) *MockMetricsManager { 27 mock := &MockMetricsManager{ctrl: ctrl} 28 mock.recorder = &MockMetricsManagerMockRecorder{mock} 29 return mock 30 } 31 32 // EXPECT returns an object that allows the caller to indicate expected use 33 func (m *MockMetricsManager) EXPECT() *MockMetricsManagerMockRecorder { 34 return m.recorder 35 } 36 37 // Start mocks base method 38 func (m *MockMetricsManager) Start() { 39 m.ctrl.T.Helper() 40 m.ctrl.Call(m, "Start") 41 } 42 43 // Start indicates an expected call of Start 44 func (mr *MockMetricsManagerMockRecorder) Start() *gomock.Call { 45 mr.mock.ctrl.T.Helper() 46 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockMetricsManager)(nil).Start)) 47 } 48 49 // Stop mocks base method 50 func (m *MockMetricsManager) Stop() { 51 m.ctrl.T.Helper() 52 m.ctrl.Call(m, "Stop") 53 } 54 55 // Stop indicates an expected call of Stop 56 func (mr *MockMetricsManagerMockRecorder) Stop() *gomock.Call { 57 mr.mock.ctrl.T.Helper() 58 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockMetricsManager)(nil).Stop)) 59 } 60 61 // NewMetric mocks base method 62 func (m *MockMetricsManager) NewMetric(pid types.PeerID, manNum uint32) *metric.PeerMetric { 63 m.ctrl.T.Helper() 64 ret := m.ctrl.Call(m, "NewMetric", pid, manNum) 65 ret0, _ := ret[0].(*metric.PeerMetric) 66 return ret0 67 } 68 69 // NewMetric indicates an expected call of NewMetric 70 func (mr *MockMetricsManagerMockRecorder) NewMetric(pid, manNum interface{}) *gomock.Call { 71 mr.mock.ctrl.T.Helper() 72 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewMetric", reflect.TypeOf((*MockMetricsManager)(nil).NewMetric), pid, manNum) 73 } 74 75 // Remove mocks base method 76 func (m *MockMetricsManager) Remove(pid types.PeerID, manNum uint32) *metric.PeerMetric { 77 m.ctrl.T.Helper() 78 ret := m.ctrl.Call(m, "Remove", pid, manNum) 79 ret0, _ := ret[0].(*metric.PeerMetric) 80 return ret0 81 } 82 83 // Remove indicates an expected call of Remove 84 func (mr *MockMetricsManagerMockRecorder) Remove(pid, manNum interface{}) *gomock.Call { 85 mr.mock.ctrl.T.Helper() 86 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockMetricsManager)(nil).Remove), pid, manNum) 87 } 88 89 // Metric mocks base method 90 func (m *MockMetricsManager) Metric(pid types.PeerID) (*metric.PeerMetric, bool) { 91 m.ctrl.T.Helper() 92 ret := m.ctrl.Call(m, "Metric", pid) 93 ret0, _ := ret[0].(*metric.PeerMetric) 94 ret1, _ := ret[1].(bool) 95 return ret0, ret1 96 } 97 98 // Metric indicates an expected call of Metric 99 func (mr *MockMetricsManagerMockRecorder) Metric(pid interface{}) *gomock.Call { 100 mr.mock.ctrl.T.Helper() 101 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Metric", reflect.TypeOf((*MockMetricsManager)(nil).Metric), pid) 102 } 103 104 // Metrics mocks base method 105 func (m *MockMetricsManager) Metrics() []*metric.PeerMetric { 106 m.ctrl.T.Helper() 107 ret := m.ctrl.Call(m, "Metrics") 108 ret0, _ := ret[0].([]*metric.PeerMetric) 109 return ret0 110 } 111 112 // Metrics indicates an expected call of Metrics 113 func (mr *MockMetricsManagerMockRecorder) Metrics() *gomock.Call { 114 mr.mock.ctrl.T.Helper() 115 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Metrics", reflect.TypeOf((*MockMetricsManager)(nil).Metrics)) 116 } 117 118 // Summary mocks base method 119 func (m *MockMetricsManager) Summary() map[string]interface{} { 120 m.ctrl.T.Helper() 121 ret := m.ctrl.Call(m, "Summary") 122 ret0, _ := ret[0].(map[string]interface{}) 123 return ret0 124 } 125 126 // Summary indicates an expected call of Summary 127 func (mr *MockMetricsManagerMockRecorder) Summary() *gomock.Call { 128 mr.mock.ctrl.T.Helper() 129 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Summary", reflect.TypeOf((*MockMetricsManager)(nil).Summary)) 130 } 131 132 // PrintMetrics mocks base method 133 func (m *MockMetricsManager) PrintMetrics() string { 134 m.ctrl.T.Helper() 135 ret := m.ctrl.Call(m, "PrintMetrics") 136 ret0, _ := ret[0].(string) 137 return ret0 138 } 139 140 // PrintMetrics indicates an expected call of PrintMetrics 141 func (mr *MockMetricsManagerMockRecorder) PrintMetrics() *gomock.Call { 142 mr.mock.ctrl.T.Helper() 143 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrintMetrics", reflect.TypeOf((*MockMetricsManager)(nil).PrintMetrics)) 144 }