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.

121 lines
2.3 KiB

  1. // Code generated by mockery. DO NOT EDIT.
  2. package mocks
  3. import (
  4. context "context"
  5. mock "github.com/stretchr/testify/mock"
  6. p2p "github.com/tendermint/tendermint/internal/p2p"
  7. )
  8. // Transport is an autogenerated mock type for the Transport type
  9. type Transport struct {
  10. mock.Mock
  11. }
  12. // Accept provides a mock function with given fields:
  13. func (_m *Transport) Accept() (p2p.Connection, error) {
  14. ret := _m.Called()
  15. var r0 p2p.Connection
  16. if rf, ok := ret.Get(0).(func() p2p.Connection); ok {
  17. r0 = rf()
  18. } else {
  19. if ret.Get(0) != nil {
  20. r0 = ret.Get(0).(p2p.Connection)
  21. }
  22. }
  23. var r1 error
  24. if rf, ok := ret.Get(1).(func() error); ok {
  25. r1 = rf()
  26. } else {
  27. r1 = ret.Error(1)
  28. }
  29. return r0, r1
  30. }
  31. // Close provides a mock function with given fields:
  32. func (_m *Transport) Close() error {
  33. ret := _m.Called()
  34. var r0 error
  35. if rf, ok := ret.Get(0).(func() error); ok {
  36. r0 = rf()
  37. } else {
  38. r0 = ret.Error(0)
  39. }
  40. return r0
  41. }
  42. // Dial provides a mock function with given fields: _a0, _a1
  43. func (_m *Transport) Dial(_a0 context.Context, _a1 p2p.Endpoint) (p2p.Connection, error) {
  44. ret := _m.Called(_a0, _a1)
  45. var r0 p2p.Connection
  46. if rf, ok := ret.Get(0).(func(context.Context, p2p.Endpoint) p2p.Connection); ok {
  47. r0 = rf(_a0, _a1)
  48. } else {
  49. if ret.Get(0) != nil {
  50. r0 = ret.Get(0).(p2p.Connection)
  51. }
  52. }
  53. var r1 error
  54. if rf, ok := ret.Get(1).(func(context.Context, p2p.Endpoint) error); ok {
  55. r1 = rf(_a0, _a1)
  56. } else {
  57. r1 = ret.Error(1)
  58. }
  59. return r0, r1
  60. }
  61. // Endpoints provides a mock function with given fields:
  62. func (_m *Transport) Endpoints() []p2p.Endpoint {
  63. ret := _m.Called()
  64. var r0 []p2p.Endpoint
  65. if rf, ok := ret.Get(0).(func() []p2p.Endpoint); ok {
  66. r0 = rf()
  67. } else {
  68. if ret.Get(0) != nil {
  69. r0 = ret.Get(0).([]p2p.Endpoint)
  70. }
  71. }
  72. return r0
  73. }
  74. // Protocols provides a mock function with given fields:
  75. func (_m *Transport) Protocols() []p2p.Protocol {
  76. ret := _m.Called()
  77. var r0 []p2p.Protocol
  78. if rf, ok := ret.Get(0).(func() []p2p.Protocol); ok {
  79. r0 = rf()
  80. } else {
  81. if ret.Get(0) != nil {
  82. r0 = ret.Get(0).([]p2p.Protocol)
  83. }
  84. }
  85. return r0
  86. }
  87. // String provides a mock function with given fields:
  88. func (_m *Transport) String() string {
  89. ret := _m.Called()
  90. var r0 string
  91. if rf, ok := ret.Get(0).(func() string); ok {
  92. r0 = rf()
  93. } else {
  94. r0 = ret.Get(0).(string)
  95. }
  96. return r0
  97. }