pkgmemoize

package
v0.0.0-...-15a92f0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EMemoFunc

type EMemoFunc func(int) (interface{}, error)

EMemoFunc is a memoizeable function with errors.

func NewEMemoFunc

func NewEMemoFunc(f func(int, EMemoFunc) (interface{}, error)) EMemoFunc

NewEMemoFunc returns a new EMemoFunc.

values and errors returned from f cannot be mutated, they will be persisted.

type EMemoFuncProvider

type EMemoFuncProvider interface {
	Get() EMemoFunc
}

EMemoFuncProvider is a provider for EMemoFuncs, good for circular dependencies.

type EMemoFuncStore

type EMemoFuncStore interface {
	EMemoFuncProvider
	Set(EMemoFunc)
}

EMemoFuncStore is a store for EMemoFuncs, good for circular dependencies.

func NewEMemoFuncStore

func NewEMemoFuncStore() EMemoFuncStore

NewEMemoFuncStore returns a new EMemoFuncStore.

type MemoFunc

type MemoFunc func(int) interface{}

MemoFunc is a memoizeable function without errors.

func NewMemoFunc

func NewMemoFunc(f func(int, MemoFunc) interface{}) MemoFunc

NewMemoFunc returns a new MemoFunc.

values returned from f cannot be mutated, they will be persisted.

type MemoFuncProvider

type MemoFuncProvider interface {
	Get() MemoFunc
}

MemoFuncProvider is a provider for MemoFuncs, good for circular dependencies.

type MemoFuncStore

type MemoFuncStore interface {
	MemoFuncProvider
	Set(MemoFunc)
}

MemoFuncStore is a store for MemoFuncs, good for circular dependencies.

func NewMemoFuncStore

func NewMemoFuncStore() MemoFuncStore

NewMemoFuncStore returns a new MemoFuncStore.

Jump to

Keyboard shortcuts

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