Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broadcaster ¶
type Broadcaster struct {
// contains filtered or unexported fields
}
Broadcaster submits transactions to a tendermint node
func NewBroadcaster ¶
func NewBroadcaster(txf tx.Factory, clientCtx sdkClient.Context, pipeline types.Pipeline, batchThreshold, batchSizeLimit int, logger log.Logger) *Broadcaster
NewBroadcaster returns a broadcaster to submit transactions to the blockchain. Only one instance of a broadcaster should be run for a given account, otherwise risk conflicting sequence numbers for submitted transactions.
func (*Broadcaster) Broadcast ¶
func (b *Broadcaster) Broadcast(ctx context.Context, msgs ...sdk.Msg) (*sdk.TxResponse, error)
Broadcast queues up the given messages for broadcast to the network. This function in thread-safe, blocks until it gets a response.
type RefundableBroadcaster ¶ added in v0.14.0
type RefundableBroadcaster struct {
// contains filtered or unexported fields
}
RefundableBroadcaster only sends RefundMsgRequest msgs
func WithRefund ¶ added in v0.14.0
func WithRefund(b *Broadcaster) *RefundableBroadcaster
WithRefund wraps a broadcaster into a RefundableBroadcaster
func (*RefundableBroadcaster) Broadcast ¶ added in v0.14.0
func (b *RefundableBroadcaster) Broadcast(ctx context.Context, msgs ...sdk.Msg) (*sdk.TxResponse, error)
Broadcast wraps all given msgs into RefundMsgRequest msgs before broadcasting them
type RetryPipeline ¶
type RetryPipeline struct {
// contains filtered or unexported fields
}
RetryPipeline manages serialized execution of functions with retry on error
func NewPipelineWithRetry ¶
func NewPipelineWithRetry(cap int, maxRetries int, backOffStrategy utils.BackOff, logger log.Logger) *RetryPipeline
NewPipelineWithRetry returns a retryPipeline with the given configuration