engine

package
v0.0.0-...-e8acdfa Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InProcCache

type InProcCache struct {
	key.AsIsFormat
	// contains filtered or unexported fields
}

Stores data in memory. Major use-case is for use on development machines

func NewInProcCache

func NewInProcCache(expires time.Duration) InProcCache

func (InProcCache) Close

func (c InProcCache) Close()

func (InProcCache) Delete

func (c InProcCache) Delete(key string) error

func (InProcCache) Get

func (c InProcCache) Get(key string) ([]byte, error)

func (InProcCache) Set

func (c InProcCache) Set(key string, data []byte, expireIn time.Duration)

type Memcache

type Memcache struct {
	key.NoSpacesFormat
	// contains filtered or unexported fields
}

func NewMemcache

func NewMemcache(host string, port int) Memcache

func (Memcache) Close

func (c Memcache) Close()

func (Memcache) Delete

func (c Memcache) Delete(key string) error

func (Memcache) Get

func (c Memcache) Get(key string) ([]byte, error)

func (Memcache) Set

func (c Memcache) Set(key string, data []byte, expireIn time.Duration)

type Redis

type Redis struct {
	key.AsIsFormat
	// contains filtered or unexported fields
}

func NewRedis

func NewRedis(host string, port int, db int) Redis

func NewRedis2

func NewRedis2(host string, port int, db int, name string) Redis

func (Redis) Close

func (rd Redis) Close()

func (Redis) Delete

func (rd Redis) Delete(key string) error

func (Redis) Get

func (rd Redis) Get(key string) ([]byte, error)

func (Redis) Len

func (rd Redis) Len() (int, error)

func (Redis) Pop

func (rd Redis) Pop() ([]byte, error)

func (Redis) PopWait

func (rd Redis) PopWait(dur time.Duration) ([]byte, error)

func (Redis) Push

func (rd Redis) Push(data []byte) error

func (Redis) Set

func (rd Redis) Set(key string, data []byte, expireIn time.Duration)

Jump to

Keyboard shortcuts

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