You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

329 lines
5.9 KiB

  1. // Code generated by mockery v2.5.1. DO NOT EDIT.
  2. package mocks
  3. import (
  4. log "github.com/tendermint/tendermint/libs/log"
  5. conn "github.com/tendermint/tendermint/p2p/conn"
  6. mock "github.com/stretchr/testify/mock"
  7. net "net"
  8. p2p "github.com/tendermint/tendermint/p2p"
  9. )
  10. // Peer is an autogenerated mock type for the Peer type
  11. type Peer struct {
  12. mock.Mock
  13. }
  14. // CloseConn provides a mock function with given fields:
  15. func (_m *Peer) CloseConn() error {
  16. ret := _m.Called()
  17. var r0 error
  18. if rf, ok := ret.Get(0).(func() error); ok {
  19. r0 = rf()
  20. } else {
  21. r0 = ret.Error(0)
  22. }
  23. return r0
  24. }
  25. // FlushStop provides a mock function with given fields:
  26. func (_m *Peer) FlushStop() {
  27. _m.Called()
  28. }
  29. // Get provides a mock function with given fields: _a0
  30. func (_m *Peer) Get(_a0 string) interface{} {
  31. ret := _m.Called(_a0)
  32. var r0 interface{}
  33. if rf, ok := ret.Get(0).(func(string) interface{}); ok {
  34. r0 = rf(_a0)
  35. } else {
  36. if ret.Get(0) != nil {
  37. r0 = ret.Get(0).(interface{})
  38. }
  39. }
  40. return r0
  41. }
  42. // ID provides a mock function with given fields:
  43. func (_m *Peer) ID() p2p.NodeID {
  44. ret := _m.Called()
  45. var r0 p2p.NodeID
  46. if rf, ok := ret.Get(0).(func() p2p.NodeID); ok {
  47. r0 = rf()
  48. } else {
  49. r0 = ret.Get(0).(p2p.NodeID)
  50. }
  51. return r0
  52. }
  53. // IsOutbound provides a mock function with given fields:
  54. func (_m *Peer) IsOutbound() bool {
  55. ret := _m.Called()
  56. var r0 bool
  57. if rf, ok := ret.Get(0).(func() bool); ok {
  58. r0 = rf()
  59. } else {
  60. r0 = ret.Get(0).(bool)
  61. }
  62. return r0
  63. }
  64. // IsPersistent provides a mock function with given fields:
  65. func (_m *Peer) IsPersistent() bool {
  66. ret := _m.Called()
  67. var r0 bool
  68. if rf, ok := ret.Get(0).(func() bool); ok {
  69. r0 = rf()
  70. } else {
  71. r0 = ret.Get(0).(bool)
  72. }
  73. return r0
  74. }
  75. // IsRunning provides a mock function with given fields:
  76. func (_m *Peer) IsRunning() bool {
  77. ret := _m.Called()
  78. var r0 bool
  79. if rf, ok := ret.Get(0).(func() bool); ok {
  80. r0 = rf()
  81. } else {
  82. r0 = ret.Get(0).(bool)
  83. }
  84. return r0
  85. }
  86. // NodeInfo provides a mock function with given fields:
  87. func (_m *Peer) NodeInfo() p2p.NodeInfo {
  88. ret := _m.Called()
  89. var r0 p2p.NodeInfo
  90. if rf, ok := ret.Get(0).(func() p2p.NodeInfo); ok {
  91. r0 = rf()
  92. } else {
  93. r0 = ret.Get(0).(p2p.NodeInfo)
  94. }
  95. return r0
  96. }
  97. // OnReset provides a mock function with given fields:
  98. func (_m *Peer) OnReset() error {
  99. ret := _m.Called()
  100. var r0 error
  101. if rf, ok := ret.Get(0).(func() error); ok {
  102. r0 = rf()
  103. } else {
  104. r0 = ret.Error(0)
  105. }
  106. return r0
  107. }
  108. // OnStart provides a mock function with given fields:
  109. func (_m *Peer) OnStart() error {
  110. ret := _m.Called()
  111. var r0 error
  112. if rf, ok := ret.Get(0).(func() error); ok {
  113. r0 = rf()
  114. } else {
  115. r0 = ret.Error(0)
  116. }
  117. return r0
  118. }
  119. // OnStop provides a mock function with given fields:
  120. func (_m *Peer) OnStop() {
  121. _m.Called()
  122. }
  123. // Quit provides a mock function with given fields:
  124. func (_m *Peer) Quit() <-chan struct{} {
  125. ret := _m.Called()
  126. var r0 <-chan struct{}
  127. if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
  128. r0 = rf()
  129. } else {
  130. if ret.Get(0) != nil {
  131. r0 = ret.Get(0).(<-chan struct{})
  132. }
  133. }
  134. return r0
  135. }
  136. // RemoteAddr provides a mock function with given fields:
  137. func (_m *Peer) RemoteAddr() net.Addr {
  138. ret := _m.Called()
  139. var r0 net.Addr
  140. if rf, ok := ret.Get(0).(func() net.Addr); ok {
  141. r0 = rf()
  142. } else {
  143. if ret.Get(0) != nil {
  144. r0 = ret.Get(0).(net.Addr)
  145. }
  146. }
  147. return r0
  148. }
  149. // RemoteIP provides a mock function with given fields:
  150. func (_m *Peer) RemoteIP() net.IP {
  151. ret := _m.Called()
  152. var r0 net.IP
  153. if rf, ok := ret.Get(0).(func() net.IP); ok {
  154. r0 = rf()
  155. } else {
  156. if ret.Get(0) != nil {
  157. r0 = ret.Get(0).(net.IP)
  158. }
  159. }
  160. return r0
  161. }
  162. // Reset provides a mock function with given fields:
  163. func (_m *Peer) Reset() error {
  164. ret := _m.Called()
  165. var r0 error
  166. if rf, ok := ret.Get(0).(func() error); ok {
  167. r0 = rf()
  168. } else {
  169. r0 = ret.Error(0)
  170. }
  171. return r0
  172. }
  173. // Send provides a mock function with given fields: _a0, _a1
  174. func (_m *Peer) Send(_a0 byte, _a1 []byte) bool {
  175. ret := _m.Called(_a0, _a1)
  176. var r0 bool
  177. if rf, ok := ret.Get(0).(func(byte, []byte) bool); ok {
  178. r0 = rf(_a0, _a1)
  179. } else {
  180. r0 = ret.Get(0).(bool)
  181. }
  182. return r0
  183. }
  184. // Set provides a mock function with given fields: _a0, _a1
  185. func (_m *Peer) Set(_a0 string, _a1 interface{}) {
  186. _m.Called(_a0, _a1)
  187. }
  188. // SetLogger provides a mock function with given fields: _a0
  189. func (_m *Peer) SetLogger(_a0 log.Logger) {
  190. _m.Called(_a0)
  191. }
  192. // SocketAddr provides a mock function with given fields:
  193. func (_m *Peer) SocketAddr() *p2p.NetAddress {
  194. ret := _m.Called()
  195. var r0 *p2p.NetAddress
  196. if rf, ok := ret.Get(0).(func() *p2p.NetAddress); ok {
  197. r0 = rf()
  198. } else {
  199. if ret.Get(0) != nil {
  200. r0 = ret.Get(0).(*p2p.NetAddress)
  201. }
  202. }
  203. return r0
  204. }
  205. // Start provides a mock function with given fields:
  206. func (_m *Peer) Start() error {
  207. ret := _m.Called()
  208. var r0 error
  209. if rf, ok := ret.Get(0).(func() error); ok {
  210. r0 = rf()
  211. } else {
  212. r0 = ret.Error(0)
  213. }
  214. return r0
  215. }
  216. // Status provides a mock function with given fields:
  217. func (_m *Peer) Status() conn.ConnectionStatus {
  218. ret := _m.Called()
  219. var r0 conn.ConnectionStatus
  220. if rf, ok := ret.Get(0).(func() conn.ConnectionStatus); ok {
  221. r0 = rf()
  222. } else {
  223. r0 = ret.Get(0).(conn.ConnectionStatus)
  224. }
  225. return r0
  226. }
  227. // Stop provides a mock function with given fields:
  228. func (_m *Peer) Stop() error {
  229. ret := _m.Called()
  230. var r0 error
  231. if rf, ok := ret.Get(0).(func() error); ok {
  232. r0 = rf()
  233. } else {
  234. r0 = ret.Error(0)
  235. }
  236. return r0
  237. }
  238. // String provides a mock function with given fields:
  239. func (_m *Peer) String() string {
  240. ret := _m.Called()
  241. var r0 string
  242. if rf, ok := ret.Get(0).(func() string); ok {
  243. r0 = rf()
  244. } else {
  245. r0 = ret.Get(0).(string)
  246. }
  247. return r0
  248. }
  249. // TrySend provides a mock function with given fields: _a0, _a1
  250. func (_m *Peer) TrySend(_a0 byte, _a1 []byte) bool {
  251. ret := _m.Called(_a0, _a1)
  252. var r0 bool
  253. if rf, ok := ret.Get(0).(func(byte, []byte) bool); ok {
  254. r0 = rf(_a0, _a1)
  255. } else {
  256. r0 = ret.Get(0).(bool)
  257. }
  258. return r0
  259. }