Documentation ¶
Index ¶
- type BlockClient
- func (_m *BlockClient) EXPECT() *BlockClient_Expecter
- func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error)
- func (_m *BlockClient) GetSyncStatus(ctx context.Context) error
- func (_m *BlockClient) Send(ctx context.Context, msg any) error
- type BlockClient_Expecter
- func (_e *BlockClient_Expecter) GetBlock(ctx interface{}, height interface{}, peerID interface{}) *BlockClient_GetBlock_Call
- func (_e *BlockClient_Expecter) GetSyncStatus(ctx interface{}) *BlockClient_GetSyncStatus_Call
- func (_e *BlockClient_Expecter) Send(ctx interface{}, msg interface{}) *BlockClient_Send_Call
- type BlockClient_GetBlock_Call
- func (_c *BlockClient_GetBlock_Call) Return(_a0 *promise.Promise[*blocksync.BlockResponse], _a1 error) *BlockClient_GetBlock_Call
- func (_c *BlockClient_GetBlock_Call) Run(run func(ctx context.Context, height int64, peerID types.NodeID)) *BlockClient_GetBlock_Call
- func (_c *BlockClient_GetBlock_Call) RunAndReturn(...) *BlockClient_GetBlock_Call
- type BlockClient_GetSyncStatus_Call
- func (_c *BlockClient_GetSyncStatus_Call) Return(_a0 error) *BlockClient_GetSyncStatus_Call
- func (_c *BlockClient_GetSyncStatus_Call) Run(run func(ctx context.Context)) *BlockClient_GetSyncStatus_Call
- func (_c *BlockClient_GetSyncStatus_Call) RunAndReturn(run func(context.Context) error) *BlockClient_GetSyncStatus_Call
- type BlockClient_Send_Call
- type SnapshotClient
- func (_m *SnapshotClient) EXPECT() *SnapshotClient_Expecter
- func (_m *SnapshotClient) GetChunk(ctx context.Context, peerID types.NodeID, height uint64, format uint32, ...) (*promise.Promise[*statesync.ChunkResponse], error)
- func (_m *SnapshotClient) GetLightBlock(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.LightBlockResponse], error)
- func (_m *SnapshotClient) GetParams(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.ParamsResponse], error)
- func (_m *SnapshotClient) GetSnapshots(ctx context.Context, peerID types.NodeID) error
- type SnapshotClient_Expecter
- func (_e *SnapshotClient_Expecter) GetChunk(ctx interface{}, peerID interface{}, height interface{}, format interface{}, ...) *SnapshotClient_GetChunk_Call
- func (_e *SnapshotClient_Expecter) GetLightBlock(ctx interface{}, peerID interface{}, height interface{}) *SnapshotClient_GetLightBlock_Call
- func (_e *SnapshotClient_Expecter) GetParams(ctx interface{}, peerID interface{}, height interface{}) *SnapshotClient_GetParams_Call
- func (_e *SnapshotClient_Expecter) GetSnapshots(ctx interface{}, peerID interface{}) *SnapshotClient_GetSnapshots_Call
- type SnapshotClient_GetChunk_Call
- func (_c *SnapshotClient_GetChunk_Call) Return(_a0 *promise.Promise[*statesync.ChunkResponse], _a1 error) *SnapshotClient_GetChunk_Call
- func (_c *SnapshotClient_GetChunk_Call) Run(...) *SnapshotClient_GetChunk_Call
- func (_c *SnapshotClient_GetChunk_Call) RunAndReturn(...) *SnapshotClient_GetChunk_Call
- type SnapshotClient_GetLightBlock_Call
- func (_c *SnapshotClient_GetLightBlock_Call) Return(_a0 *promise.Promise[*statesync.LightBlockResponse], _a1 error) *SnapshotClient_GetLightBlock_Call
- func (_c *SnapshotClient_GetLightBlock_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64)) *SnapshotClient_GetLightBlock_Call
- func (_c *SnapshotClient_GetLightBlock_Call) RunAndReturn(...) *SnapshotClient_GetLightBlock_Call
- type SnapshotClient_GetParams_Call
- func (_c *SnapshotClient_GetParams_Call) Return(_a0 *promise.Promise[*statesync.ParamsResponse], _a1 error) *SnapshotClient_GetParams_Call
- func (_c *SnapshotClient_GetParams_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64)) *SnapshotClient_GetParams_Call
- func (_c *SnapshotClient_GetParams_Call) RunAndReturn(...) *SnapshotClient_GetParams_Call
- type SnapshotClient_GetSnapshots_Call
- func (_c *SnapshotClient_GetSnapshots_Call) Return(_a0 error) *SnapshotClient_GetSnapshots_Call
- func (_c *SnapshotClient_GetSnapshots_Call) Run(run func(ctx context.Context, peerID types.NodeID)) *SnapshotClient_GetSnapshots_Call
- func (_c *SnapshotClient_GetSnapshots_Call) RunAndReturn(run func(context.Context, types.NodeID) error) *SnapshotClient_GetSnapshots_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockClient ¶
BlockClient is an autogenerated mock type for the BlockClient type
func NewBlockClient ¶
func NewBlockClient(t interface { mock.TestingT Cleanup(func()) }) *BlockClient
NewBlockClient creates a new instance of BlockClient. 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 (*BlockClient) EXPECT ¶ added in v1.4.0
func (_m *BlockClient) EXPECT() *BlockClient_Expecter
func (*BlockClient) GetBlock ¶
func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error)
GetBlock provides a mock function with given fields: ctx, height, peerID
func (*BlockClient) GetSyncStatus ¶
func (_m *BlockClient) GetSyncStatus(ctx context.Context) error
GetSyncStatus provides a mock function with given fields: ctx
type BlockClient_Expecter ¶ added in v1.4.0
type BlockClient_Expecter struct {
// contains filtered or unexported fields
}
func (*BlockClient_Expecter) GetBlock ¶ added in v1.4.0
func (_e *BlockClient_Expecter) GetBlock(ctx interface{}, height interface{}, peerID interface{}) *BlockClient_GetBlock_Call
GetBlock is a helper method to define mock.On call
- ctx context.Context
- height int64
- peerID types.NodeID
func (*BlockClient_Expecter) GetSyncStatus ¶ added in v1.4.0
func (_e *BlockClient_Expecter) GetSyncStatus(ctx interface{}) *BlockClient_GetSyncStatus_Call
GetSyncStatus is a helper method to define mock.On call
- ctx context.Context
func (*BlockClient_Expecter) Send ¶ added in v1.4.0
func (_e *BlockClient_Expecter) Send(ctx interface{}, msg interface{}) *BlockClient_Send_Call
Send is a helper method to define mock.On call
- ctx context.Context
- msg any
type BlockClient_GetBlock_Call ¶ added in v1.4.0
BlockClient_GetBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlock'
func (*BlockClient_GetBlock_Call) Return ¶ added in v1.4.0
func (_c *BlockClient_GetBlock_Call) Return(_a0 *promise.Promise[*blocksync.BlockResponse], _a1 error) *BlockClient_GetBlock_Call
func (*BlockClient_GetBlock_Call) Run ¶ added in v1.4.0
func (_c *BlockClient_GetBlock_Call) Run(run func(ctx context.Context, height int64, peerID types.NodeID)) *BlockClient_GetBlock_Call
func (*BlockClient_GetBlock_Call) RunAndReturn ¶ added in v1.4.0
func (_c *BlockClient_GetBlock_Call) RunAndReturn(run func(context.Context, int64, types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error)) *BlockClient_GetBlock_Call
type BlockClient_GetSyncStatus_Call ¶ added in v1.4.0
BlockClient_GetSyncStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSyncStatus'
func (*BlockClient_GetSyncStatus_Call) Return ¶ added in v1.4.0
func (_c *BlockClient_GetSyncStatus_Call) Return(_a0 error) *BlockClient_GetSyncStatus_Call
func (*BlockClient_GetSyncStatus_Call) Run ¶ added in v1.4.0
func (_c *BlockClient_GetSyncStatus_Call) Run(run func(ctx context.Context)) *BlockClient_GetSyncStatus_Call
func (*BlockClient_GetSyncStatus_Call) RunAndReturn ¶ added in v1.4.0
func (_c *BlockClient_GetSyncStatus_Call) RunAndReturn(run func(context.Context) error) *BlockClient_GetSyncStatus_Call
type BlockClient_Send_Call ¶ added in v1.4.0
BlockClient_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send'
func (*BlockClient_Send_Call) Return ¶ added in v1.4.0
func (_c *BlockClient_Send_Call) Return(_a0 error) *BlockClient_Send_Call
func (*BlockClient_Send_Call) Run ¶ added in v1.4.0
func (_c *BlockClient_Send_Call) Run(run func(ctx context.Context, msg any)) *BlockClient_Send_Call
func (*BlockClient_Send_Call) RunAndReturn ¶ added in v1.4.0
func (_c *BlockClient_Send_Call) RunAndReturn(run func(context.Context, any) error) *BlockClient_Send_Call
type SnapshotClient ¶
SnapshotClient is an autogenerated mock type for the SnapshotClient type
func NewSnapshotClient ¶
func NewSnapshotClient(t interface { mock.TestingT Cleanup(func()) }) *SnapshotClient
NewSnapshotClient creates a new instance of SnapshotClient. 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 (*SnapshotClient) EXPECT ¶ added in v1.4.0
func (_m *SnapshotClient) EXPECT() *SnapshotClient_Expecter
func (*SnapshotClient) GetChunk ¶
func (_m *SnapshotClient) GetChunk(ctx context.Context, peerID types.NodeID, height uint64, format uint32, index uint32) (*promise.Promise[*statesync.ChunkResponse], error)
GetChunk provides a mock function with given fields: ctx, peerID, height, format, index
func (*SnapshotClient) GetLightBlock ¶
func (_m *SnapshotClient) GetLightBlock(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.LightBlockResponse], error)
GetLightBlock provides a mock function with given fields: ctx, peerID, height
func (*SnapshotClient) GetParams ¶
func (_m *SnapshotClient) GetParams(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.ParamsResponse], error)
GetParams provides a mock function with given fields: ctx, peerID, height
func (*SnapshotClient) GetSnapshots ¶
GetSnapshots provides a mock function with given fields: ctx, peerID
type SnapshotClient_Expecter ¶ added in v1.4.0
type SnapshotClient_Expecter struct {
// contains filtered or unexported fields
}
func (*SnapshotClient_Expecter) GetChunk ¶ added in v1.4.0
func (_e *SnapshotClient_Expecter) GetChunk(ctx interface{}, peerID interface{}, height interface{}, format interface{}, index interface{}) *SnapshotClient_GetChunk_Call
GetChunk is a helper method to define mock.On call
- ctx context.Context
- peerID types.NodeID
- height uint64
- format uint32
- index uint32
func (*SnapshotClient_Expecter) GetLightBlock ¶ added in v1.4.0
func (_e *SnapshotClient_Expecter) GetLightBlock(ctx interface{}, peerID interface{}, height interface{}) *SnapshotClient_GetLightBlock_Call
GetLightBlock is a helper method to define mock.On call
- ctx context.Context
- peerID types.NodeID
- height uint64
func (*SnapshotClient_Expecter) GetParams ¶ added in v1.4.0
func (_e *SnapshotClient_Expecter) GetParams(ctx interface{}, peerID interface{}, height interface{}) *SnapshotClient_GetParams_Call
GetParams is a helper method to define mock.On call
- ctx context.Context
- peerID types.NodeID
- height uint64
func (*SnapshotClient_Expecter) GetSnapshots ¶ added in v1.4.0
func (_e *SnapshotClient_Expecter) GetSnapshots(ctx interface{}, peerID interface{}) *SnapshotClient_GetSnapshots_Call
GetSnapshots is a helper method to define mock.On call
- ctx context.Context
- peerID types.NodeID
type SnapshotClient_GetChunk_Call ¶ added in v1.4.0
SnapshotClient_GetChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChunk'
func (*SnapshotClient_GetChunk_Call) Return ¶ added in v1.4.0
func (_c *SnapshotClient_GetChunk_Call) Return(_a0 *promise.Promise[*statesync.ChunkResponse], _a1 error) *SnapshotClient_GetChunk_Call
func (*SnapshotClient_GetChunk_Call) Run ¶ added in v1.4.0
func (_c *SnapshotClient_GetChunk_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64, format uint32, index uint32)) *SnapshotClient_GetChunk_Call
func (*SnapshotClient_GetChunk_Call) RunAndReturn ¶ added in v1.4.0
func (_c *SnapshotClient_GetChunk_Call) RunAndReturn(run func(context.Context, types.NodeID, uint64, uint32, uint32) (*promise.Promise[*statesync.ChunkResponse], error)) *SnapshotClient_GetChunk_Call
type SnapshotClient_GetLightBlock_Call ¶ added in v1.4.0
SnapshotClient_GetLightBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLightBlock'
func (*SnapshotClient_GetLightBlock_Call) Return ¶ added in v1.4.0
func (_c *SnapshotClient_GetLightBlock_Call) Return(_a0 *promise.Promise[*statesync.LightBlockResponse], _a1 error) *SnapshotClient_GetLightBlock_Call
func (*SnapshotClient_GetLightBlock_Call) Run ¶ added in v1.4.0
func (_c *SnapshotClient_GetLightBlock_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64)) *SnapshotClient_GetLightBlock_Call
func (*SnapshotClient_GetLightBlock_Call) RunAndReturn ¶ added in v1.4.0
func (_c *SnapshotClient_GetLightBlock_Call) RunAndReturn(run func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.LightBlockResponse], error)) *SnapshotClient_GetLightBlock_Call
type SnapshotClient_GetParams_Call ¶ added in v1.4.0
SnapshotClient_GetParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParams'
func (*SnapshotClient_GetParams_Call) Return ¶ added in v1.4.0
func (_c *SnapshotClient_GetParams_Call) Return(_a0 *promise.Promise[*statesync.ParamsResponse], _a1 error) *SnapshotClient_GetParams_Call
func (*SnapshotClient_GetParams_Call) Run ¶ added in v1.4.0
func (_c *SnapshotClient_GetParams_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64)) *SnapshotClient_GetParams_Call
func (*SnapshotClient_GetParams_Call) RunAndReturn ¶ added in v1.4.0
func (_c *SnapshotClient_GetParams_Call) RunAndReturn(run func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.ParamsResponse], error)) *SnapshotClient_GetParams_Call
type SnapshotClient_GetSnapshots_Call ¶ added in v1.4.0
SnapshotClient_GetSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSnapshots'
func (*SnapshotClient_GetSnapshots_Call) Return ¶ added in v1.4.0
func (_c *SnapshotClient_GetSnapshots_Call) Return(_a0 error) *SnapshotClient_GetSnapshots_Call
func (*SnapshotClient_GetSnapshots_Call) Run ¶ added in v1.4.0
func (_c *SnapshotClient_GetSnapshots_Call) Run(run func(ctx context.Context, peerID types.NodeID)) *SnapshotClient_GetSnapshots_Call
func (*SnapshotClient_GetSnapshots_Call) RunAndReturn ¶ added in v1.4.0
func (_c *SnapshotClient_GetSnapshots_Call) RunAndReturn(run func(context.Context, types.NodeID) error) *SnapshotClient_GetSnapshots_Call