Documentation ¶
Index ¶
- type MultiClient
- func (m *MultiClient) ActivateChain(chID *iscp.ChainID) error
- func (m *MultiClient) DKSharesGet(sharedAddress ledgerstate.Address) ([]*model.DKSharesInfo, error)
- func (m *MultiClient) DeactivateChain(chID *iscp.ChainID) error
- func (m *MultiClient) Do(f func(int, *client.WaspClient) error) error
- func (m *MultiClient) DoWithQuorum(f func(int, *client.WaspClient) error, quorum int) error
- func (m *MultiClient) Len() int
- func (m *MultiClient) PutChainRecord(bd *registry.ChainRecord) error
- func (m *MultiClient) WaitUntilAllRequestsProcessed(chainID *iscp.ChainID, tx *ledgerstate.Transaction, timeout time.Duration) error
- func (m *MultiClient) WaitUntilRequestProcessed(chainID *iscp.ChainID, reqID iscp.RequestID, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiClient ¶
MultiClient allows to send webapi requests in parallel to multiple wasp nodes
func New ¶
func New(hosts []string, httpClient ...func() http.Client) *MultiClient
New creates a new instance of MultiClient
func (*MultiClient) ActivateChain ¶
func (m *MultiClient) ActivateChain(chID *iscp.ChainID) error
ActivateChain sends a request to activate a chain in all wasp nodes
func (*MultiClient) DKSharesGet ¶
func (m *MultiClient) DKSharesGet(sharedAddress ledgerstate.Address) ([]*model.DKSharesInfo, error)
DKSharesGet retrieves distributed key info with specific ChainID from multiple hosts.
func (*MultiClient) DeactivateChain ¶
func (m *MultiClient) DeactivateChain(chID *iscp.ChainID) error
DeactivateChain sends a request to deactivate a chain in all wasp nodes
func (*MultiClient) Do ¶
func (m *MultiClient) Do(f func(int, *client.WaspClient) error) error
Do executes a callback once for each node in parallel, then wraps all error results into a single one
func (*MultiClient) DoWithQuorum ¶
func (m *MultiClient) DoWithQuorum(f func(int, *client.WaspClient) error, quorum int) error
Do executes a callback once for each node in parallel, then wraps all error results into a single one
func (*MultiClient) Len ¶
func (m *MultiClient) Len() int
func (*MultiClient) PutChainRecord ¶
func (m *MultiClient) PutChainRecord(bd *registry.ChainRecord) error
PutChainRecord calls PutChainRecord in all wasp nodes
func (*MultiClient) WaitUntilAllRequestsProcessed ¶
func (m *MultiClient) WaitUntilAllRequestsProcessed(chainID *iscp.ChainID, tx *ledgerstate.Transaction, timeout time.Duration) error
WaitUntilAllRequestsProcessed blocks until all requests in the given transaction have been processed by all nodes
func (*MultiClient) WaitUntilRequestProcessed ¶
func (m *MultiClient) WaitUntilRequestProcessed(chainID *iscp.ChainID, reqID iscp.RequestID, timeout time.Duration) error
WaitUntilRequestProcessed blocks until the request has been processed by all nodes