Versions in this module Expand all Collapse all v0 v0.9.1 May 5, 2023 v0.9.0 Mar 22, 2023 Changes in this version + var ErrBatchFailure = errors.New("batch request failure") + var ErrNoAliveNode = errors.New("there is no alive node") + func DefaultHeartbeatFn(ctx context.Context, endpoint string) error + type Config struct + Endpoints []string + HeartbeatInterval time.Duration + HeartbeatTimeout time.Duration + RequestTimeout time.Duration + Threshold int + func DefaultConfig() *Config + type HeartbeatFn func(ctx context.Context, endpoint string) error + type Redgla struct + func New(fn HeartbeatFn, cfg *Config) (*Redgla, error) + func (r *Redgla) AddNode(endpoint string) error + func (r *Redgla) Benchmark(height uint64, cnt int) (map[string]time.Duration, error) + func (r *Redgla) BlockByRange(start uint64, end uint64) (map[uint64]*types.Block, error) + func (r *Redgla) BlockByRangeWithBatch(start uint64, end uint64) (map[uint64]*types.Block, error) + func (r *Redgla) DelNode(endpoint string) error + func (r *Redgla) ReceiptByTxs(txs []*types.Transaction) (map[common.Hash]*types.Receipt, error) + func (r *Redgla) ReceiptByTxsWithBatch(txs []*types.Transaction) (map[common.Hash]*types.Receipt, error) + func (r *Redgla) Run() + func (r *Redgla) Stop() + func (r *Redgla) TransactionByHashes(hashes []common.Hash) (map[common.Hash]*types.Transaction, error) + func (r *Redgla) TransactionByHashesWithBatch(hashes []common.Hash) (map[common.Hash]*types.Transaction, error)