Documentation ¶
Overview ¶
cache_converter is the go between to migrate to/from v3/4 To read the source data, it needs to loop through all it's keys For this reason, it will likely only ever support Redis (on v3) and BoltCache on v4
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheConverter ¶
type CacheConverter struct { Cfg Config Cachesv4 struct { UUID cache.Cache UserData cache.Cache } Cachesv3 struct { UUID legacy_storage.Storage UserData legacy_storage.Storage } Now time.Time }
func New ¶
func New(cfg Config) (*CacheConverter, error)
func (*CacheConverter) MigrateUserDataV3toV4 ¶
func (cc *CacheConverter) MigrateUserDataV3toV4()
V3 -> V4
func (*CacheConverter) MigrateUserDataV4toV3 ¶
func (cc *CacheConverter) MigrateUserDataV4toV3()
V4 -> V3
type Config ¶
type Config struct { Logger log.Logger MinTTL time.Duration CacheUUIDv4 *cache_config.Config `yaml:"cache_uuid"` CacheUserDatav4 *cache_config.Config `yaml:"cache_userdata"` CacheUUIDv3 *RedisConfig `yaml:"cachev3_uuid"` CacheUserDatav3 *RedisConfig `yaml:"cachev3_userdata"` }
func (*Config) RegisterFlags ¶
type RedisConfig ¶
type RedisConfig radix.RedisConfig
func (*RedisConfig) RegisterFlags ¶
func (rc *RedisConfig) RegisterFlags(f *flag.FlagSet, cacheID string)
Click to show internal directories.
Click to hide internal directories.