Documentation ¶
Index ¶
- func MustNewRedisClient(url string) *redis.Client
- func ParseRedisNil(err error) error
- func RedisKey(keyParts ...string) string
- func RedisRLPGet(ctx context.Context, rc redis.Cmdable, key string, pVal interface{}) error
- func StrUint64(v uint64) string
- type RedisStore
- func (rs *RedisStore) Close() error
- func (rs *RedisStore) DequeueBlocks(epochUntil uint64) error
- func (rs *RedisStore) DequeueLogs(epochUntil uint64) error
- func (rs *RedisStore) DequeueTransactions(epochUntil uint64) error
- func (rs *RedisStore) Flush() error
- func (rs *RedisStore) GetBlockByBlockNumber(ctx context.Context, blockNumber uint64) (*store.Block, error)
- func (rs *RedisStore) GetBlockByEpoch(ctx context.Context, epochNumber uint64) (*store.Block, error)
- func (rs *RedisStore) GetBlockByHash(ctx context.Context, blockHash types.Hash) (*store.Block, error)
- func (rs *RedisStore) GetBlockEpochRange() (uint64, uint64, error)
- func (rs *RedisStore) GetBlockSummaryByBlockNumber(ctx context.Context, blockNumber uint64) (*store.BlockSummary, error)
- func (rs *RedisStore) GetBlockSummaryByEpoch(ctx context.Context, epochNumber uint64) (*store.BlockSummary, error)
- func (rs *RedisStore) GetBlockSummaryByHash(ctx context.Context, blockHash types.Hash) (*store.BlockSummary, error)
- func (rs *RedisStore) GetBlocksByEpoch(ctx context.Context, epochNumber uint64) ([]types.Hash, error)
- func (rs *RedisStore) GetGlobalEpochRange() (uint64, uint64, error)
- func (rs *RedisStore) GetLogEpochRange() (uint64, uint64, error)
- func (rs *RedisStore) GetLogs(ctx context.Context, filter store.LogFilter) (logs []*store.Log, err error)
- func (rs *RedisStore) GetNumBlocks() (uint64, error)
- func (rs *RedisStore) GetNumLogs() (uint64, error)
- func (rs *RedisStore) GetNumTransactions() (uint64, error)
- func (rs *RedisStore) GetReceipt(ctx context.Context, txHash types.Hash) (*store.TransactionReceipt, error)
- func (rs *RedisStore) GetTransaction(ctx context.Context, txHash types.Hash) (*store.Transaction, error)
- func (rs *RedisStore) GetTransactionEpochRange() (uint64, uint64, error)
- func (rs *RedisStore) IsRecordNotFound(err error) bool
- func (rs *RedisStore) LoadConfig(confNames ...string) (map[string]interface{}, error)
- func (rs *RedisStore) Pop() error
- func (rs *RedisStore) Popn(epochUntil uint64) error
- func (rs *RedisStore) Push(data *store.EpochData) error
- func (rs *RedisStore) Pushn(dataSlice []*store.EpochData) error
- func (rs *RedisStore) StoreConfig(confName string, confVal interface{}) error
- type RedisStoreConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustNewRedisClient ¶
func MustNewRedisClient(url string) *redis.Client
func ParseRedisNil ¶
func RedisRLPGet ¶
Unmarshal RLP raw data read from redis by key key: redis key v: value for unmarshal, e.g. types.transaction, and use pointer type
Types ¶
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
RedisStore aggregation store to cache block/txn/receipt data in Redis. Be noted this would be deprecated in the next few release due to chain data are usually oversized (with some of them even more than several MB). It is totally inefficient for Redis to cache big key under such circumstance.
func MustNewRedisStoreFromViper ¶
func MustNewRedisStoreFromViper(disabler store.StoreDisabler) (*RedisStore, bool)
func (*RedisStore) Close ¶
func (rs *RedisStore) Close() error
func (*RedisStore) DequeueBlocks ¶
func (rs *RedisStore) DequeueBlocks(epochUntil uint64) error
func (*RedisStore) DequeueLogs ¶
func (rs *RedisStore) DequeueLogs(epochUntil uint64) error
func (*RedisStore) DequeueTransactions ¶
func (rs *RedisStore) DequeueTransactions(epochUntil uint64) error
func (*RedisStore) Flush ¶
func (rs *RedisStore) Flush() error
func (*RedisStore) GetBlockByBlockNumber ¶
func (*RedisStore) GetBlockByEpoch ¶
func (*RedisStore) GetBlockByHash ¶
func (*RedisStore) GetBlockEpochRange ¶
func (rs *RedisStore) GetBlockEpochRange() (uint64, uint64, error)
func (*RedisStore) GetBlockSummaryByBlockNumber ¶
func (rs *RedisStore) GetBlockSummaryByBlockNumber(ctx context.Context, blockNumber uint64) (*store.BlockSummary, error)
func (*RedisStore) GetBlockSummaryByEpoch ¶
func (rs *RedisStore) GetBlockSummaryByEpoch(ctx context.Context, epochNumber uint64) (*store.BlockSummary, error)
func (*RedisStore) GetBlockSummaryByHash ¶
func (rs *RedisStore) GetBlockSummaryByHash(ctx context.Context, blockHash types.Hash) (*store.BlockSummary, error)
func (*RedisStore) GetBlocksByEpoch ¶
func (*RedisStore) GetGlobalEpochRange ¶
func (rs *RedisStore) GetGlobalEpochRange() (uint64, uint64, error)
func (*RedisStore) GetLogEpochRange ¶
func (rs *RedisStore) GetLogEpochRange() (uint64, uint64, error)
func (*RedisStore) GetNumBlocks ¶
func (rs *RedisStore) GetNumBlocks() (uint64, error)
func (*RedisStore) GetNumLogs ¶
func (rs *RedisStore) GetNumLogs() (uint64, error)
func (*RedisStore) GetNumTransactions ¶
func (rs *RedisStore) GetNumTransactions() (uint64, error)
func (*RedisStore) GetReceipt ¶
func (rs *RedisStore) GetReceipt(ctx context.Context, txHash types.Hash) (*store.TransactionReceipt, error)
func (*RedisStore) GetTransaction ¶
func (rs *RedisStore) GetTransaction(ctx context.Context, txHash types.Hash) (*store.Transaction, error)
func (*RedisStore) GetTransactionEpochRange ¶
func (rs *RedisStore) GetTransactionEpochRange() (uint64, uint64, error)
func (*RedisStore) IsRecordNotFound ¶
func (rs *RedisStore) IsRecordNotFound(err error) bool
func (*RedisStore) LoadConfig ¶
func (rs *RedisStore) LoadConfig(confNames ...string) (map[string]interface{}, error)
func (*RedisStore) Pop ¶
func (rs *RedisStore) Pop() error
func (*RedisStore) Popn ¶
func (rs *RedisStore) Popn(epochUntil uint64) error
Popn pops multiple epoch data from redis.
func (*RedisStore) StoreConfig ¶
func (rs *RedisStore) StoreConfig(confName string, confVal interface{}) error
Click to show internal directories.
Click to hide internal directories.