cache

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.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 Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache .

func New

func New(root string, redis *redis.Client) *Cache

New .

func (*Cache) Contains

func (c *Cache) Contains(key Key) (bool, error)

func (*Cache) Keys

func (c *Cache) Keys() ([]Key, error)

func (*Cache) ListByKeys

func (c *Cache) ListByKeys(keys []Key) (map[Key]Value, error)

func (*Cache) Put

func (c *Cache) Put(data *pb.Checker) error

func (*Cache) Remove

func (c *Cache) Remove(key Key) error

type CacheStorage

type CacheStorage struct {
	*Cache
}

CacheStorage .

func (*CacheStorage) ListByIDs

func (s *CacheStorage) ListByIDs(ids []int64) (map[int64]*pb.Checker, error)

func (*CacheStorage) ListIDs

func (s *CacheStorage) ListIDs() ([]int64, error)

type Key

type Key = int64

type Value

type Value = *pb.Checker

Jump to

Keyboard shortcuts

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