Documentation
¶
Index ¶
- type RpcWorkerPool
- func (p *RpcWorkerPool) AfterApplicationCreation(application driver.Application)
- func (p *RpcWorkerPool) AfterNodeCreation(newNode driver.Node)
- func (p *RpcWorkerPool) BeforeNodeRemoval(node driver.Node)
- func (p *RpcWorkerPool) Close() error
- func (p *RpcWorkerPool) RegisterObserver(observer driver.TransactionObserver)
- func (p *RpcWorkerPool) RestrictApp(app string, nodes []string)
- func (p *RpcWorkerPool) SendTransaction(tx *types.Transaction, source driver.TransactionSource)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RpcWorkerPool ¶
type RpcWorkerPool struct {
// contains filtered or unexported fields
}
func NewRpcWorkerPool ¶
func NewRpcWorkerPool(ctx context.Context) *RpcWorkerPool
func (*RpcWorkerPool) AfterApplicationCreation ¶
func (p *RpcWorkerPool) AfterApplicationCreation(application driver.Application)
func (*RpcWorkerPool) AfterNodeCreation ¶
func (p *RpcWorkerPool) AfterNodeCreation(newNode driver.Node)
func (*RpcWorkerPool) BeforeNodeRemoval ¶
func (p *RpcWorkerPool) BeforeNodeRemoval(node driver.Node)
func (*RpcWorkerPool) Close ¶
func (p *RpcWorkerPool) Close() error
func (*RpcWorkerPool) RegisterObserver ¶
func (p *RpcWorkerPool) RegisterObserver(observer driver.TransactionObserver)
RegisterObserver adds an observer to be notified about every transaction this pool submits. Observers may be registered at any time; a transaction already submitted is not reported retroactively.
func (*RpcWorkerPool) RestrictApp ¶
func (p *RpcWorkerPool) RestrictApp(app string, nodes []string)
RestrictApp makes the pool submit the transactions of the given application only through the nodes with the given labels, or through any node when there are none.
func (*RpcWorkerPool) SendTransaction ¶
func (p *RpcWorkerPool) SendTransaction(tx *types.Transaction, source driver.TransactionSource)
SendTransaction hands the transaction to a worker of a node its application may submit through. When the chosen node is removed first, it tries another.
Click to show internal directories.
Click to hide internal directories.