Documentation ¶
Index ¶
- type MockAlphabillClient
- func (c *MockAlphabillClient) ClearRecordedTransactions()
- func (c *MockAlphabillClient) Close() error
- func (c *MockAlphabillClient) GetBlock(_ context.Context, blockNumber uint64) ([]byte, error)
- func (c *MockAlphabillClient) GetBlocks(_ context.Context, blockNumber, _ uint64) (*alphabill.GetBlocksResponse, error)
- func (c *MockAlphabillClient) GetLastRequestedBlockNumber() uint64
- func (c *MockAlphabillClient) GetRecordedTransactions() []*types.TransactionOrder
- func (c *MockAlphabillClient) GetRoundNumber(ctx context.Context) (uint64, error)
- func (c *MockAlphabillClient) IsShutdown() bool
- func (c *MockAlphabillClient) SendTransaction(_ context.Context, tx *types.TransactionOrder) error
- func (c *MockAlphabillClient) SendTransactionWithRetry(ctx context.Context, tx *types.TransactionOrder, maxTries int) error
- func (c *MockAlphabillClient) SetBlock(b *types.Block)
- func (c *MockAlphabillClient) SetIncrementOnFetch(incrementOnFetch bool)
- func (c *MockAlphabillClient) SetMaxBlockNumber(blockNumber uint64)
- func (c *MockAlphabillClient) SetMaxRoundNumber(roundNumber uint64)
- func (c *MockAlphabillClient) SetTxListener(txListener func(tx *types.TransactionOrder))
- func (c *MockAlphabillClient) SetTxResponse(txResponse error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAlphabillClient ¶
type MockAlphabillClient struct {
// contains filtered or unexported fields
}
MockAlphabillClient for testing. NOT thread safe.
func NewMockAlphabillClient ¶
func NewMockAlphabillClient(options ...Option) *MockAlphabillClient
func (*MockAlphabillClient) ClearRecordedTransactions ¶
func (c *MockAlphabillClient) ClearRecordedTransactions()
func (*MockAlphabillClient) Close ¶ added in v0.2.0
func (c *MockAlphabillClient) Close() error
func (*MockAlphabillClient) GetBlocks ¶
func (c *MockAlphabillClient) GetBlocks(_ context.Context, blockNumber, _ uint64) (*alphabill.GetBlocksResponse, error)
func (*MockAlphabillClient) GetLastRequestedBlockNumber ¶ added in v0.2.0
func (c *MockAlphabillClient) GetLastRequestedBlockNumber() uint64
func (*MockAlphabillClient) GetRecordedTransactions ¶
func (c *MockAlphabillClient) GetRecordedTransactions() []*types.TransactionOrder
func (*MockAlphabillClient) GetRoundNumber ¶ added in v0.2.0
func (c *MockAlphabillClient) GetRoundNumber(ctx context.Context) (uint64, error)
func (*MockAlphabillClient) IsShutdown ¶
func (c *MockAlphabillClient) IsShutdown() bool
func (*MockAlphabillClient) SendTransaction ¶
func (c *MockAlphabillClient) SendTransaction(_ context.Context, tx *types.TransactionOrder) error
func (*MockAlphabillClient) SendTransactionWithRetry ¶ added in v0.2.0
func (c *MockAlphabillClient) SendTransactionWithRetry(ctx context.Context, tx *types.TransactionOrder, maxTries int) error
func (*MockAlphabillClient) SetBlock ¶
func (c *MockAlphabillClient) SetBlock(b *types.Block)
func (*MockAlphabillClient) SetIncrementOnFetch ¶ added in v0.2.0
func (c *MockAlphabillClient) SetIncrementOnFetch(incrementOnFetch bool)
func (*MockAlphabillClient) SetMaxBlockNumber ¶
func (c *MockAlphabillClient) SetMaxBlockNumber(blockNumber uint64)
func (*MockAlphabillClient) SetMaxRoundNumber ¶ added in v0.2.0
func (c *MockAlphabillClient) SetMaxRoundNumber(roundNumber uint64)
func (*MockAlphabillClient) SetTxListener ¶ added in v0.2.0
func (c *MockAlphabillClient) SetTxListener(txListener func(tx *types.TransactionOrder))
func (*MockAlphabillClient) SetTxResponse ¶
func (c *MockAlphabillClient) SetTxResponse(txResponse error)
type Option ¶ added in v0.2.0
type Option func(c *MockAlphabillClient)
MockAlphabillClient for testing. NOT thread safe.
func WithMaxBlockNumber ¶ added in v0.2.0
func WithMaxRoundNumber ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.