memo

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEmpty added in v0.1.5

func IsEmpty(v interface{}) bool

Types

type MemoStore

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

func NewMemoStore

func NewMemoStore(liveDuration time.Duration, liveDelta time.Duration) *MemoStore

func (*MemoStore) Close added in v0.3.0

func (store *MemoStore) Close(ctx context.Context) error

func (*MemoStore) Delete

func (store *MemoStore) Delete(id interface{})

func (*MemoStore) Get

func (store *MemoStore) Get(id interface{}) (interface{}, bool)

func (*MemoStore) KeepLive

func (store *MemoStore) KeepLive(id interface{})

func (*MemoStore) Live

func (store *MemoStore) Live(id interface{}) time.Time

func (*MemoStore) Load

func (store *MemoStore) Load(id interface{}, deft interface{}) (interface{}, bool)

func (*MemoStore) Range

func (store *MemoStore) Range(r func(id, v interface{}) bool)

func (*MemoStore) Set

func (store *MemoStore) Set(id, value interface{}) error

Jump to

Keyboard shortcuts

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