mxcache

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0, Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type ExpireErrors

type ExpireErrors []error

func (ExpireErrors) Err

func (e ExpireErrors) Err() error

func (ExpireErrors) Error

func (e ExpireErrors) Error() string

type ExpiredKeys

type ExpiredKeys []string

type MXCacheCreator

type MXCacheCreator func(u *url.URL) (MXCacher, error)

type MXCacher

type MXCacher interface {
	Get(key string, i interface{}) error
	Set(key string, data interface{}, ex int) error
	Expire(pattern string) (ExpiredKeys, error)
	Incr(key string) (int64, error)
	IncrBy(key string, value int64) (int64, error)
	ExpireAt(key string, time time.Time) error
	Ping() error
}

func NewMXCache

func NewMXCache(uri string) (MXCacher, error)

type MXKeysLister

type MXKeysLister interface {
	Keys(pattern string) ([]string, error)
}

type MXKeysRemover

type MXKeysRemover interface {
	RemoveKeys(keys ...string) error
}

Jump to

Keyboard shortcuts

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