redisadapter

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

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) GetName

func (s *RedisCacheSession) GetName() string

GetName 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) Set

func (s *RedisCacheSession) Set(key string, value []byte, expire time.Duration) bool

Set value by key

func (*RedisCacheSession) StartKeepalive

func (s *RedisCacheSession) StartKeepalive()

StartKeepalive keepalive

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL