store

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalCacheStore

type LocalCacheStore struct {
	Cache *cache.Cache
}

func NewCacheStore

func NewCacheStore() *LocalCacheStore

func (*LocalCacheStore) Get

func (s *LocalCacheStore) Get(key string) (string, error)

func (*LocalCacheStore) Set

func (s *LocalCacheStore) Set(key string, value string) error

type MemcachedStore

type MemcachedStore struct {
	Cache  *memcached.Client
	Prefix string
}

func NewMemcachedStore

func NewMemcachedStore(hosts string, prefix string) *MemcachedStore

func (*MemcachedStore) Get

func (m *MemcachedStore) Get(key string) (string, error)

func (*MemcachedStore) Ping

func (m *MemcachedStore) Ping() error

func (*MemcachedStore) Set

func (m *MemcachedStore) Set(key string, value string) error

type Store

type Store interface {
	Get(key string) (string, error)
	Set(key string, value string) error
}

Jump to

Keyboard shortcuts

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