Documentation
¶
Index ¶
- Variables
- func Await(f *Future) (interface{}, error)
- type AnyResult
- type Future
- func AllOf(fs ...*Future) *Future
- func AnyOf(fs ...*Future) *Future
- func Async(f func() (interface{}, error)) *Future
- func Done(val interface{}) *Future
- func Lazy(f func() (interface{}, error)) *Future
- func Then(f *Future, cb func(interface{}, error) (interface{}, error)) *Future
- func ThenAsync(f *Future, cb func(interface{}, error) *Future) *Future
- func Timeout(f *Future, d time.Duration) *Future
- func ToAny(f *Future) *Future
- func Until(f *Future, t time.Time) *Future
- type Promise
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPanic = errors.New("async panic")
View Source
var ErrTimeout = errors.New("future timeout")
Functions ¶
Types ¶
type Future ¶
type Future struct {
// contains filtered or unexported fields
}
func (*Future) GetOrDefault ¶
func (f *Future) GetOrDefault(defaultVal interface{}) interface{}
type Promise ¶
type Promise struct {
// contains filtered or unexported fields
}
func NewPromise ¶
func NewPromise() *Promise
Click to show internal directories.
Click to hide internal directories.