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.

331 lines
5.9 KiB

  1. // Code generated by mockery v2.3.0. 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. if ret.Get(0) != nil {
  94. r0 = ret.Get(0).(p2p.NodeInfo)
  95. }
  96. }
  97. return r0
  98. }
  99. // OnReset provides a mock function with given fields:
  100. func (_m *Peer) OnReset() error {
  101. ret := _m.Called()
  102. var r0 error
  103. if rf, ok := ret.Get(0).(func() error); ok {
  104. r0 = rf()
  105. } else {
  106. r0 = ret.Error(0)
  107. }
  108. return r0
  109. }
  110. // OnStart provides a mock function with given fields:
  111. func (_m *Peer) OnStart() error {
  112. ret := _m.Called()
  113. var r0 error
  114. if rf, ok := ret.Get(0).(func() error); ok {
  115. r0 = rf()
  116. } else {
  117. r0 = ret.Error(0)
  118. }
  119. return r0
  120. }
  121. // OnStop provides a mock function with given fields:
  122. func (_m *Peer) OnStop() {
  123. _m.Called()
  124. }
  125. // Quit provides a mock function with given fields:
  126. func (_m *Peer) Quit() <-chan struct{} {
  127. ret := _m.Called()
  128. var r0 <-chan struct{}
  129. if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
  130. r0 = rf()
  131. } else {
  132. if ret.Get(0) != nil {
  133. r0 = ret.Get(0).(<-chan struct{})
  134. }
  135. }
  136. return r0
  137. }
  138. // RemoteAddr provides a mock function with given fields:
  139. func (_m *Peer) RemoteAddr() net.Addr {
  140. ret := _m.Called()
  141. var r0 net.Addr
  142. if rf, ok := ret.Get(0).(func() net.Addr); ok {
  143. r0 = rf()
  144. } else {
  145. if ret.Get(0) != nil {
  146. r0 = ret.Get(0).(net.Addr)
  147. }
  148. }
  149. return r0
  150. }
  151. // RemoteIP provides a mock function with given fields:
  152. func (_m *Peer) RemoteIP() net.IP {
  153. ret := _m.Called()
  154. var r0 net.IP
  155. if rf, ok := ret.Get(0).(func() net.IP); ok {
  156. r0 = rf()
  157. } else {
  158. if ret.Get(0) != nil {
  159. r0 = ret.Get(0).(net.IP)
  160. }
  161. }
  162. return r0
  163. }
  164. // Reset provides a mock function with given fields:
  165. func (_m *Peer) Reset() error {
  166. ret := _m.Called()
  167. var r0 error
  168. if rf, ok := ret.Get(0).(func() error); ok {
  169. r0 = rf()
  170. } else {
  171. r0 = ret.Error(0)
  172. }
  173. return r0
  174. }
  175. // Send provides a mock function with given fields: _a0, _a1
  176. func (_m *Peer) Send(_a0 byte, _a1 []byte) bool {
  177. ret := _m.Called(_a0, _a1)
  178. var r0 bool
  179. if rf, ok := ret.Get(0).(func(byte, []byte) bool); ok {
  180. r0 = rf(_a0, _a1)
  181. } else {
  182. r0 = ret.Get(0).(bool)
  183. }
  184. return r0
  185. }
  186. // Set provides a mock function with given fields: _a0, _a1
  187. func (_m *Peer) Set(_a0 string, _a1 interface{}) {
  188. _m.Called(_a0, _a1)
  189. }
  190. // SetLogger provides a mock function with given fields: _a0
  191. func (_m *Peer) SetLogger(_a0 log.Logger) {
  192. _m.Called(_a0)
  193. }
  194. // SocketAddr provides a mock function with given fields:
  195. func (_m *Peer) SocketAddr() *p2p.NetAddress {
  196. ret := _m.Called()
  197. var r0 *p2p.NetAddress
  198. if rf, ok := ret.Get(0).(func() *p2p.NetAddress); ok {
  199. r0 = rf()
  200. } else {
  201. if ret.Get(0) != nil {
  202. r0 = ret.Get(0).(*p2p.NetAddress)
  203. }
  204. }
  205. return r0
  206. }
  207. // Start provides a mock function with given fields:
  208. func (_m *Peer) Start() error {
  209. ret := _m.Called()
  210. var r0 error
  211. if rf, ok := ret.Get(0).(func() error); ok {
  212. r0 = rf()
  213. } else {
  214. r0 = ret.Error(0)
  215. }
  216. return r0
  217. }
  218. // Status provides a mock function with given fields:
  219. func (_m *Peer) Status() conn.ConnectionStatus {
  220. ret := _m.Called()
  221. var r0 conn.ConnectionStatus
  222. if rf, ok := ret.Get(0).(func() conn.ConnectionStatus); ok {
  223. r0 = rf()
  224. } else {
  225. r0 = ret.Get(0).(conn.ConnectionStatus)
  226. }
  227. return r0
  228. }
  229. // Stop provides a mock function with given fields:
  230. func (_m *Peer) Stop() error {
  231. ret := _m.Called()
  232. var r0 error
  233. if rf, ok := ret.Get(0).(func() error); ok {
  234. r0 = rf()
  235. } else {
  236. r0 = ret.Error(0)
  237. }
  238. return r0
  239. }
  240. // String provides a mock function with given fields:
  241. func (_m *Peer) String() string {
  242. ret := _m.Called()
  243. var r0 string
  244. if rf, ok := ret.Get(0).(func() string); ok {
  245. r0 = rf()
  246. } else {
  247. r0 = ret.Get(0).(string)
  248. }
  249. return r0
  250. }
  251. // TrySend provides a mock function with given fields: _a0, _a1
  252. func (_m *Peer) TrySend(_a0 byte, _a1 []byte) bool {
  253. ret := _m.Called(_a0, _a1)
  254. var r0 bool
  255. if rf, ok := ret.Get(0).(func(byte, []byte) bool); ok {
  256. r0 = rf(_a0, _a1)
  257. } else {
  258. r0 = ret.Get(0).(bool)
  259. }
  260. return r0
  261. }