cache

package module
v0.0.0-...-537bc95 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: MIT Imports: 3 Imported by: 0

README

cache

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(p *Value) ([]byte, error)

func Unmarshal

func Unmarshal(b []byte, cv *Value) error

Types

type Cache

type Cache interface {
	Get(key []byte) ([]byte, bool)
	GetRange(key []byte, low, high int64) ([]byte, bool)
	Set(key []byte, value []byte) error
	SetTimeout(key []byte, value []byte, timeout time.Duration) error
	Delete(key []byte) error
	Clean() error
	Empty() error
}

type Value

type Value struct {
	Timeout int64
	Size    int64
	Value   []byte
}

func (*Value) Valid

func (p *Value) Valid() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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