memcacheadapter

package
v0.0.0-...-7a3883e Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MemCachePingInterval = 5
)

Constant

Variables

This section is empty.

Functions

This section is empty.

Types

type MemCacheSession

type MemCacheSession struct {
	Client *memcache.Client
	Name   string
	Addr   string
	// contains filtered or unexported fields
}

MemCacheSession session struct

func NewMemcacheSession

func NewMemcacheSession(name string, conf cachingenv.CacheConnectorConfig) (*MemCacheSession, error)

NewMemcacheSession new session struct

func (*MemCacheSession) Get

func (s *MemCacheSession) Get(key string) ([]byte, error)

Get value by key

func (*MemCacheSession) GetConnectionString

func (s *MemCacheSession) GetConnectionString() string

GetConnectionString getter

func (*MemCacheSession) GetName

func (s *MemCacheSession) GetName() string

GetName getter

func (*MemCacheSession) Initialized

func (s *MemCacheSession) Initialized() bool

Initialized if initialized

func (*MemCacheSession) Set

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

Set value by key

func (*MemCacheSession) StartKeepalive

func (s *MemCacheSession) StartKeepalive()

StartKeepalive start keepalive

Jump to

Keyboard shortcuts

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