Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block interface {
GetHeight() uint64
GetTxs() []Transaction
GetMetadata(columns types.SQLColumnNames) (map[string]interface{}, error)
}
type BlockConsumerConfig ¶ added in v0.31.1
type BlockConsumerConfig struct {
// The maximum number of requests to make per TimeBase before throttling requests
MaxRequests int
// The base duration over which to count requests to check for overage of MaxRequests
TimeBase time.Duration
// The base backoff - we wait this amount of time between each batch and we increase the backoff exponentially
// until we reach MaxRetries from BaseBackoffDuration
BaseBackoffDuration time.Duration
// The maximum number of retries before failing
MaxRetries uint64
// The default and maximum batch size for block requests, we will reduce it logarithmically to a single block
// when backing off
MaxBlockBatchSize uint64
}
Client-side block consumer configuration. Requests are retried subject to backoff if a non-fatal error is detected
func (*BlockConsumerConfig) Complete ¶ added in v0.31.1
func (config *BlockConsumerConfig) Complete()
type Chain ¶
type Chain interface {
GetChainID() string
GetVersion() string
ConsumeBlocks(ctx context.Context, in *rpcevents.BlockRange, consumer func(Block) error) error
StatusMessage(ctx context.Context, lastProcessedHeight uint64) []interface{}
Connectivity() connectivity.State
GetABI(ctx context.Context, address crypto.Address) (string, error)
Close() error
}
Click to show internal directories.
Click to hide internal directories.