Documentation ¶
Index ¶
- Constants
- type RedisCacheSession
- func (s *RedisCacheSession) Get(key string) ([]byte, error)
- func (s *RedisCacheSession) GetConnectionString() string
- func (s *RedisCacheSession) GetName() string
- func (s *RedisCacheSession) Initialized() bool
- func (s *RedisCacheSession) OnConnected(*redis.Conn) error
- func (s *RedisCacheSession) Set(key string, value []byte, expire time.Duration) bool
- func (s *RedisCacheSession) StartKeepalive()
Constants ¶
View Source
const (
RedisPingInterval = 5
)
Constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisCacheSession ¶
type RedisCacheSession struct { Client redis.UniversalClient Name string Addr string // contains filtered or unexported fields }
RedisCacheSession instance
func NewRedisSession ¶
func NewRedisSession(name string, conf cachingenv.CacheConnectorConfig) (*RedisCacheSession, error)
NewRedisSession new session
func (*RedisCacheSession) Get ¶
func (s *RedisCacheSession) Get(key string) ([]byte, error)
Get value by key
func (*RedisCacheSession) GetConnectionString ¶
func (s *RedisCacheSession) GetConnectionString() string
GetConnectionString getter
func (*RedisCacheSession) Initialized ¶
func (s *RedisCacheSession) Initialized() bool
Initialized getter
func (*RedisCacheSession) OnConnected ¶
func (s *RedisCacheSession) OnConnected(*redis.Conn) error
OnConnected event
func (*RedisCacheSession) StartKeepalive ¶
func (s *RedisCacheSession) StartKeepalive()
StartKeepalive keepalive
Click to show internal directories.
Click to hide internal directories.