Documentation
¶
Index ¶
- Constants
- func GetRedisData(ctx context.Context, rdb *redis.Client, key string) (string, error)
- func InvalidateRedisData(ctx context.Context, rdb *redis.Client, key string) error
- func InvalidateRedisDataByPrefix(ctx context.Context, rdb *redis.Client, prefix string) error
- func NewRedisClient(ctx context.Context, configFile string) (*redis.Client, error)
- func RewardsKey(evmAddr string) string
- func SetRedisData(ctx context.Context, rdb *redis.Client, key string, data string) error
- func ValidatorsKey(params map[string]string) string
- type RedisConfig
Constants ¶
View Source
const ( RewardsKeyPrefix = "rewards" ValidatorsKeyPrefix = "validators" // {prefix}_{evm_address} RewardsKeyFormat = "%s_%s" // {prefix}_{status}_{page.key}_{page.offset}_{page.limit}_{page.count_total}_{page.reverse} ValidatorsKeyFormat = "%s_%s_%s_%s_%s_%s_%s" )
View Source
const ( DefaultRedisConfigPrefix = "redis" RedisPasswordModePlain = "plain" RedisPasswordModeGCP = "gcp-secret-manager" )
View Source
const (
DefaultCacheTTL = time.Hour
)
Variables ¶
This section is empty.
Functions ¶
func GetRedisData ¶
func InvalidateRedisData ¶
func NewRedisClient ¶
func RewardsKey ¶
func SetRedisData ¶
func ValidatorsKey ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.