cache

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DoNotPromote = errors.New("do not promote")
	NotFound     = errors.New("not found")
)

Functions

func OpenShared

func OpenShared()

Types

type Cache

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

func (*Cache) Get

func (c *Cache) Get(key []byte, f WithValueFunc) error

func (*Cache) Put

func (c *Cache) Put(key, value []byte) error

type Storage

type Storage struct {
	// contains filtered or unexported fields
}
var (
	Shared *Storage
)

func Open

func Open(path string, mode os.FileMode) (*Storage, error)

func (*Storage) Cache

func (s *Storage) Cache(name string) *Cache

func (*Storage) Close

func (s *Storage) Close() error

type WithValueFunc

type WithValueFunc func(value []byte) error

Jump to

Keyboard shortcuts

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