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.

319 lines
5.6 KiB

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