memo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoStore

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

func NewMemoStore

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

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) Run

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

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