Documentation ¶ Index ¶ type Func func Memorized(bucket string, mem Memorizer, fn Func) Func type Memorizer type Params func NewParams(params ...interface{}) *Params func (p Params) Get(paramName string) interface{} func (p Params) Key() interface{} func (p *Params) TTL(ttl int64) *Params type Results func NewResults(params ...interface{}) *Results func (r *Results) Add(params ...interface{}) func (r *Results) Set(params ...interface{}) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Func ¶ type Func func(*Params, *Results) error func Memorized ¶ func Memorized(bucket string, mem Memorizer, fn Func) Func type Memorizer ¶ type Memorizer interface { Add(bucket string) Put(bucket string, key, val interface{}, ttl int64) Get(bucket string, key, val interface{}) error } type Params ¶ type Params struct { CacheTTL int64 Keys []string Values []interface{} } func NewParams ¶ func NewParams(params ...interface{}) *Params func (Params) Get ¶ func (p Params) Get(paramName string) interface{} func (Params) Key ¶ func (p Params) Key() interface{} func (*Params) TTL ¶ func (p *Params) TTL(ttl int64) *Params type Results ¶ type Results struct { *Params } func NewResults ¶ func NewResults(params ...interface{}) *Results func (*Results) Add ¶ func (r *Results) Add(params ...interface{}) func (*Results) Set ¶ func (r *Results) Set(params ...interface{}) Source Files ¶ View all Source files memorizer.goparams.goresults.go Click to show internal directories. Click to hide internal directories.