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.

143 lines
2.8 KiB

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