Documentation
¶
Index ¶
- type ReorgDetector
- func (_m *ReorgDetector) AddBlockToTrack(ctx context.Context, id string, blockNum uint64, blockHash common.Hash) error
- func (_m *ReorgDetector) EXPECT() *ReorgDetector_Expecter
- func (_m *ReorgDetector) GetFinalizedBlockType() types.BlockNumberFinality
- func (_m *ReorgDetector) GetLastReorgEvent(ctx context.Context) (reorgdetector.ReorgEvent, error)
- func (_m *ReorgDetector) GetTrackedBlockByBlockNumber(id string, blockNumber uint64) (*reorgdetector.Header, error)
- func (_m *ReorgDetector) String() string
- func (_m *ReorgDetector) Subscribe(id string) (*reorgdetector.Subscription, error)
- type ReorgDetector_AddBlockToTrack_Call
- func (_c *ReorgDetector_AddBlockToTrack_Call) Return(_a0 error) *ReorgDetector_AddBlockToTrack_Call
- func (_c *ReorgDetector_AddBlockToTrack_Call) Run(...) *ReorgDetector_AddBlockToTrack_Call
- func (_c *ReorgDetector_AddBlockToTrack_Call) RunAndReturn(run func(context.Context, string, uint64, common.Hash) error) *ReorgDetector_AddBlockToTrack_Call
- type ReorgDetector_Expecter
- func (_e *ReorgDetector_Expecter) AddBlockToTrack(ctx interface{}, id interface{}, blockNum interface{}, blockHash interface{}) *ReorgDetector_AddBlockToTrack_Call
- func (_e *ReorgDetector_Expecter) GetFinalizedBlockType() *ReorgDetector_GetFinalizedBlockType_Call
- func (_e *ReorgDetector_Expecter) GetLastReorgEvent(ctx interface{}) *ReorgDetector_GetLastReorgEvent_Call
- func (_e *ReorgDetector_Expecter) GetTrackedBlockByBlockNumber(id interface{}, blockNumber interface{}) *ReorgDetector_GetTrackedBlockByBlockNumber_Call
- func (_e *ReorgDetector_Expecter) String() *ReorgDetector_String_Call
- func (_e *ReorgDetector_Expecter) Subscribe(id interface{}) *ReorgDetector_Subscribe_Call
- type ReorgDetector_GetFinalizedBlockType_Call
- func (_c *ReorgDetector_GetFinalizedBlockType_Call) Return(_a0 types.BlockNumberFinality) *ReorgDetector_GetFinalizedBlockType_Call
- func (_c *ReorgDetector_GetFinalizedBlockType_Call) Run(run func()) *ReorgDetector_GetFinalizedBlockType_Call
- func (_c *ReorgDetector_GetFinalizedBlockType_Call) RunAndReturn(run func() types.BlockNumberFinality) *ReorgDetector_GetFinalizedBlockType_Call
- type ReorgDetector_GetLastReorgEvent_Call
- func (_c *ReorgDetector_GetLastReorgEvent_Call) Return(_a0 reorgdetector.ReorgEvent, _a1 error) *ReorgDetector_GetLastReorgEvent_Call
- func (_c *ReorgDetector_GetLastReorgEvent_Call) Run(run func(ctx context.Context)) *ReorgDetector_GetLastReorgEvent_Call
- func (_c *ReorgDetector_GetLastReorgEvent_Call) RunAndReturn(run func(context.Context) (reorgdetector.ReorgEvent, error)) *ReorgDetector_GetLastReorgEvent_Call
- type ReorgDetector_GetTrackedBlockByBlockNumber_Call
- func (_c *ReorgDetector_GetTrackedBlockByBlockNumber_Call) Return(_a0 *reorgdetector.Header, _a1 error) *ReorgDetector_GetTrackedBlockByBlockNumber_Call
- func (_c *ReorgDetector_GetTrackedBlockByBlockNumber_Call) Run(run func(id string, blockNumber uint64)) *ReorgDetector_GetTrackedBlockByBlockNumber_Call
- func (_c *ReorgDetector_GetTrackedBlockByBlockNumber_Call) RunAndReturn(run func(string, uint64) (*reorgdetector.Header, error)) *ReorgDetector_GetTrackedBlockByBlockNumber_Call
- type ReorgDetector_String_Call
- type ReorgDetector_Subscribe_Call
- func (_c *ReorgDetector_Subscribe_Call) Return(_a0 *reorgdetector.Subscription, _a1 error) *ReorgDetector_Subscribe_Call
- func (_c *ReorgDetector_Subscribe_Call) Run(run func(id string)) *ReorgDetector_Subscribe_Call
- func (_c *ReorgDetector_Subscribe_Call) RunAndReturn(run func(string) (*reorgdetector.Subscription, error)) *ReorgDetector_Subscribe_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReorgDetector ¶
ReorgDetector is an autogenerated mock type for the ReorgDetector type
func NewReorgDetector ¶
func NewReorgDetector(t interface {
mock.TestingT
Cleanup(func())
}) *ReorgDetector
NewReorgDetector creates a new instance of ReorgDetector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ReorgDetector) AddBlockToTrack ¶
func (_m *ReorgDetector) AddBlockToTrack(ctx context.Context, id string, blockNum uint64, blockHash common.Hash) error
AddBlockToTrack provides a mock function with given fields: ctx, id, blockNum, blockHash
func (*ReorgDetector) EXPECT ¶
func (_m *ReorgDetector) EXPECT() *ReorgDetector_Expecter
func (*ReorgDetector) GetFinalizedBlockType ¶ added in v0.0.2
func (_m *ReorgDetector) GetFinalizedBlockType() types.BlockNumberFinality
GetFinalizedBlockType provides a mock function with no fields
func (*ReorgDetector) GetLastReorgEvent ¶ added in v0.5.0
func (_m *ReorgDetector) GetLastReorgEvent(ctx context.Context) (reorgdetector.ReorgEvent, error)
GetLastReorgEvent provides a mock function with given fields: ctx
func (*ReorgDetector) GetTrackedBlockByBlockNumber ¶ added in v0.7.1
func (_m *ReorgDetector) GetTrackedBlockByBlockNumber(id string, blockNumber uint64) (*reorgdetector.Header, error)
GetTrackedBlockByBlockNumber provides a mock function with given fields: id, blockNumber
func (*ReorgDetector) String ¶ added in v0.0.2
func (_m *ReorgDetector) String() string
String provides a mock function with no fields
func (*ReorgDetector) Subscribe ¶
func (_m *ReorgDetector) Subscribe(id string) (*reorgdetector.Subscription, error)
Subscribe provides a mock function with given fields: id
type ReorgDetector_AddBlockToTrack_Call ¶
ReorgDetector_AddBlockToTrack_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddBlockToTrack'
func (*ReorgDetector_AddBlockToTrack_Call) Return ¶
func (_c *ReorgDetector_AddBlockToTrack_Call) Return(_a0 error) *ReorgDetector_AddBlockToTrack_Call
func (*ReorgDetector_AddBlockToTrack_Call) Run ¶
func (_c *ReorgDetector_AddBlockToTrack_Call) Run(run func(ctx context.Context, id string, blockNum uint64, blockHash common.Hash)) *ReorgDetector_AddBlockToTrack_Call
func (*ReorgDetector_AddBlockToTrack_Call) RunAndReturn ¶
func (_c *ReorgDetector_AddBlockToTrack_Call) RunAndReturn(run func(context.Context, string, uint64, common.Hash) error) *ReorgDetector_AddBlockToTrack_Call
type ReorgDetector_Expecter ¶
type ReorgDetector_Expecter struct {
// contains filtered or unexported fields
}
func (*ReorgDetector_Expecter) AddBlockToTrack ¶
func (_e *ReorgDetector_Expecter) AddBlockToTrack(ctx interface{}, id interface{}, blockNum interface{}, blockHash interface{}) *ReorgDetector_AddBlockToTrack_Call
AddBlockToTrack is a helper method to define mock.On call
- ctx context.Context
- id string
- blockNum uint64
- blockHash common.Hash
func (*ReorgDetector_Expecter) GetFinalizedBlockType ¶ added in v0.0.2
func (_e *ReorgDetector_Expecter) GetFinalizedBlockType() *ReorgDetector_GetFinalizedBlockType_Call
GetFinalizedBlockType is a helper method to define mock.On call
func (*ReorgDetector_Expecter) GetLastReorgEvent ¶ added in v0.5.0
func (_e *ReorgDetector_Expecter) GetLastReorgEvent(ctx interface{}) *ReorgDetector_GetLastReorgEvent_Call
GetLastReorgEvent is a helper method to define mock.On call
- ctx context.Context
func (*ReorgDetector_Expecter) GetTrackedBlockByBlockNumber ¶ added in v0.7.1
func (_e *ReorgDetector_Expecter) GetTrackedBlockByBlockNumber(id interface{}, blockNumber interface{}) *ReorgDetector_GetTrackedBlockByBlockNumber_Call
GetTrackedBlockByBlockNumber is a helper method to define mock.On call
- id string
- blockNumber uint64
func (*ReorgDetector_Expecter) String ¶ added in v0.0.2
func (_e *ReorgDetector_Expecter) String() *ReorgDetector_String_Call
String is a helper method to define mock.On call
func (*ReorgDetector_Expecter) Subscribe ¶
func (_e *ReorgDetector_Expecter) Subscribe(id interface{}) *ReorgDetector_Subscribe_Call
Subscribe is a helper method to define mock.On call
- id string
type ReorgDetector_GetFinalizedBlockType_Call ¶ added in v0.0.2
ReorgDetector_GetFinalizedBlockType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFinalizedBlockType'
func (*ReorgDetector_GetFinalizedBlockType_Call) Return ¶ added in v0.0.2
func (_c *ReorgDetector_GetFinalizedBlockType_Call) Return(_a0 types.BlockNumberFinality) *ReorgDetector_GetFinalizedBlockType_Call
func (*ReorgDetector_GetFinalizedBlockType_Call) Run ¶ added in v0.0.2
func (_c *ReorgDetector_GetFinalizedBlockType_Call) Run(run func()) *ReorgDetector_GetFinalizedBlockType_Call
func (*ReorgDetector_GetFinalizedBlockType_Call) RunAndReturn ¶ added in v0.0.2
func (_c *ReorgDetector_GetFinalizedBlockType_Call) RunAndReturn(run func() types.BlockNumberFinality) *ReorgDetector_GetFinalizedBlockType_Call
type ReorgDetector_GetLastReorgEvent_Call ¶ added in v0.5.0
ReorgDetector_GetLastReorgEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLastReorgEvent'
func (*ReorgDetector_GetLastReorgEvent_Call) Return ¶ added in v0.5.0
func (_c *ReorgDetector_GetLastReorgEvent_Call) Return(_a0 reorgdetector.ReorgEvent, _a1 error) *ReorgDetector_GetLastReorgEvent_Call
func (*ReorgDetector_GetLastReorgEvent_Call) Run ¶ added in v0.5.0
func (_c *ReorgDetector_GetLastReorgEvent_Call) Run(run func(ctx context.Context)) *ReorgDetector_GetLastReorgEvent_Call
func (*ReorgDetector_GetLastReorgEvent_Call) RunAndReturn ¶ added in v0.5.0
func (_c *ReorgDetector_GetLastReorgEvent_Call) RunAndReturn(run func(context.Context) (reorgdetector.ReorgEvent, error)) *ReorgDetector_GetLastReorgEvent_Call
type ReorgDetector_GetTrackedBlockByBlockNumber_Call ¶ added in v0.7.1
ReorgDetector_GetTrackedBlockByBlockNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTrackedBlockByBlockNumber'
func (*ReorgDetector_GetTrackedBlockByBlockNumber_Call) Return ¶ added in v0.7.1
func (_c *ReorgDetector_GetTrackedBlockByBlockNumber_Call) Return(_a0 *reorgdetector.Header, _a1 error) *ReorgDetector_GetTrackedBlockByBlockNumber_Call
func (*ReorgDetector_GetTrackedBlockByBlockNumber_Call) Run ¶ added in v0.7.1
func (_c *ReorgDetector_GetTrackedBlockByBlockNumber_Call) Run(run func(id string, blockNumber uint64)) *ReorgDetector_GetTrackedBlockByBlockNumber_Call
func (*ReorgDetector_GetTrackedBlockByBlockNumber_Call) RunAndReturn ¶ added in v0.7.1
func (_c *ReorgDetector_GetTrackedBlockByBlockNumber_Call) RunAndReturn(run func(string, uint64) (*reorgdetector.Header, error)) *ReorgDetector_GetTrackedBlockByBlockNumber_Call
type ReorgDetector_String_Call ¶ added in v0.0.2
ReorgDetector_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String'
func (*ReorgDetector_String_Call) Return ¶ added in v0.0.2
func (_c *ReorgDetector_String_Call) Return(_a0 string) *ReorgDetector_String_Call
func (*ReorgDetector_String_Call) Run ¶ added in v0.0.2
func (_c *ReorgDetector_String_Call) Run(run func()) *ReorgDetector_String_Call
func (*ReorgDetector_String_Call) RunAndReturn ¶ added in v0.0.2
func (_c *ReorgDetector_String_Call) RunAndReturn(run func() string) *ReorgDetector_String_Call
type ReorgDetector_Subscribe_Call ¶
ReorgDetector_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe'
func (*ReorgDetector_Subscribe_Call) Return ¶
func (_c *ReorgDetector_Subscribe_Call) Return(_a0 *reorgdetector.Subscription, _a1 error) *ReorgDetector_Subscribe_Call
func (*ReorgDetector_Subscribe_Call) Run ¶
func (_c *ReorgDetector_Subscribe_Call) Run(run func(id string)) *ReorgDetector_Subscribe_Call
func (*ReorgDetector_Subscribe_Call) RunAndReturn ¶
func (_c *ReorgDetector_Subscribe_Call) RunAndReturn(run func(string) (*reorgdetector.Subscription, error)) *ReorgDetector_Subscribe_Call