future

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Future

type Future interface {
	Wait() (interface{}, error)
	Then(ThenFunc) Future
}

func Go

func Go(fn GoFunc) Future

type GoFunc

type GoFunc func() (interface{}, error)

type ThenFunc

type ThenFunc func(interface{}) (interface{}, error)

type Value

type Value interface {
	Future
	Resolve(interface{}, error)
}

func NewValue

func NewValue() Value

type Waiter

type Waiter interface {
	Wait()
	Done()
}

func NewWaiter

func NewWaiter() Waiter

Jump to

Keyboard shortcuts

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