Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RedisStoreConfig ¶
type RedisStoreConfig struct { RedisType string `mapstructure:"redis_type"` Network string `mapstructure:"network"` Addr string `mapstructure:"addr"` Password string `mapstructure:"password"` DB int `mapstructure:"db"` Addresses []string `mapstructure:"addresses"` Username string `mapstructure:"username"` SentinelPassword string `mapstructure:"sentinel_password"` MaxRetries int `mapstructure:"max_retries"` MinRetryBackoff string `mapstructure:"min_retry_backoff"` MaxRetryBackoff string `mapstructure:"max_retry_backoff"` DialTimeout string `mapstructure:"dial_timeout"` ReadTimeout string `mapstructure:"read_timeout"` WriteTimeout string `mapstructure:"write_timeout"` PoolSize int `mapstructure:"pool_size"` MinIdleConns int `mapstructure:"min_idle_conns"` MaxConnAge string `mapstructure:"max_conn_age"` PoolTimeout string `mapstructure:"pool_timeout"` IdleTimeout string `mapstructure:"idle_timeout"` IdleCheckFrequency string `mapstructure:"idle_check_frequency"` MaxRedirects int `mapstructure:"max_redirects"` ReadOnly bool `mapstructure:"read_only"` RouteByLatency bool `mapstructure:"route_by_latency"` RouteRandomly bool `mapstructure:"route_randomly"` SlaveOnly bool `mapstructure:"slave_only"` Randomly bool `mapstructure:"randomly"` MasterName string `mapstructure:"master_name"` NewClient func(opt *redis.Options) *redis.Client TLSConfig *tls.Config Dialer func(ctx context.Context, network, addr string) (net.Conn, error) OnConnect func(ctx context.Context, cn *redis.Conn) error Limiter redis.Limiter ClusterSlots func(ctx context.Context) ([]redis.ClusterSlot, error) }
RedisStoreConfig redis config
func (RedisStoreConfig) NewRedis ¶
func (rsc RedisStoreConfig) NewRedis() redis.Cmdable
NewRedis get a storage operation instance of redis according to the configuration information
type Sessions ¶
type Sessions struct { Driver string `mapstructure:"driver"` RedisStoreConfig RedisStoreConfig `mapstructure:"redis"` Key string `mapstructure:"key"` Name string `mapstructure:"name"` Domain string `mapstructure:"domain"` MaxAge string `mapstructure:"max_age"` HTTPOnly bool `mapstructure:"http_only"` // contains filtered or unexported fields }
Sessions session related function processing
Click to show internal directories.
Click to hide internal directories.