Documentation ¶
Index ¶
- Constants
- Variables
- func NewRedisClusterPool(forceReconnect bool, config RedisStorageConfig) redis.UniversalClient
- type AnalyticsStorage
- type EnvMapString
- type RedisClusterStorageManager
- func (r *RedisClusterStorageManager) Connect() bool
- func (r *RedisClusterStorageManager) GetAndDeleteSet(keyName string, chunkSize int64, expire time.Duration) []interface{}
- func (r *RedisClusterStorageManager) GetName() string
- func (r *RedisClusterStorageManager) Init(config interface{}) error
- func (r *RedisClusterStorageManager) SetExp(keyName string, timeout int64) error
- func (r *RedisClusterStorageManager) SetKey(keyName, session string, timeout int64) error
- type RedisStorageConfig
Constants ¶
View Source
const ( RedisKeyPrefix string = "analytics-" ANALYTICS_KEYNAME string = "tyk-system-analytics" UptimeAnalytics_KEYNAME string = "tyk-uptime-analytics" )
Variables ¶
View Source
var AvailableStores map[string]AnalyticsStorage
View Source
var ENV_REDIS_PREFIX = "TYK_PMP_REDIS"
Functions ¶
func NewRedisClusterPool ¶
func NewRedisClusterPool(forceReconnect bool, config RedisStorageConfig) redis.UniversalClient
Types ¶
type AnalyticsStorage ¶
type EnvMapString ¶
func (*EnvMapString) Decode ¶
func (e *EnvMapString) Decode(value string) error
type RedisClusterStorageManager ¶
type RedisClusterStorageManager struct { KeyPrefix string HashKeys bool Config RedisStorageConfig // contains filtered or unexported fields }
RedisClusterStorageManager is a storage manager that uses the redis database.
func (*RedisClusterStorageManager) Connect ¶
func (r *RedisClusterStorageManager) Connect() bool
Connect will establish a connection to the r.db
func (*RedisClusterStorageManager) GetAndDeleteSet ¶
func (r *RedisClusterStorageManager) GetAndDeleteSet(keyName string, chunkSize int64, expire time.Duration) []interface{}
func (*RedisClusterStorageManager) GetName ¶
func (r *RedisClusterStorageManager) GetName() string
func (*RedisClusterStorageManager) Init ¶
func (r *RedisClusterStorageManager) Init(config interface{}) error
type RedisStorageConfig ¶
type RedisStorageConfig struct { Type string `mapstructure:"type"` Host string `mapstructure:"host"` Port int `mapstructure:"port"` Hosts EnvMapString `mapstructure:"hosts"` // Deprecated: Use Addrs instead. Addrs []string `mapstructure:"addrs"` MasterName string `mapstructure:"master_name" json:"master_name"` SentinelPassword string `mapstructure:"sentinel_password" json:"sentinel_password"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` Database int `mapstructure:"database"` Timeout int `mapstructure:"timeout"` MaxIdle int `mapstructure:"optimisation_max_idle" json:"optimisation_max_idle"` MaxActive int `mapstructure:"optimisation_max_active" json:"optimisation_max_active"` EnableCluster bool `mapstructure:"enable_cluster" json:"enable_cluster"` RedisKeyPrefix string `mapstructure:"redis_key_prefix" json:"redis_key_prefix"` RedisUseSSL bool `mapstructure:"redis_use_ssl" json:"redis_use_ssl"` RedisSSLInsecureSkipVerify bool `mapstructure:"redis_ssl_insecure_skip_verify" json:"redis_ssl_insecure_skip_verify"` }
Click to show internal directories.
Click to hide internal directories.