lazy

package
v0.0.0-...-ed9fe1d Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package lazy provides context-based lazy evaluatios

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(context.Context) (interface{}, error)

Func is an alias to lazy evaluated function

func (Func) Eval

func (f Func) Eval(ctx context.Context) (interface{}, error)

Eval implements Value#Eval

type Value

type Value interface {
	Eval(context.Context) (interface{}, error)
}

Value is an interface to represent lazy value

func New

func New(v interface{}) Value

New returns a new Value to return v

Jump to

Keyboard shortcuts

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