Q

package module
v0.0.0-...-49dbd8c Latest Latest
Warning

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

Go to latest
Published: May 25, 2014 License: MIT Imports: 8 Imported by: 1

README

wercker status

go-promise

A nodejs Q inspired promise package

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProgressor

func NewProgressor() *progressor

///////////////////////////////////////////////////////////////////////////////////// NewProgressor /////////////////////////////////////////////////////////////////////////////////////

func OnComposingError

func OnComposingError(errorFunc ErrorFunc)

///////////////////////////////////////////////////////////////////////////////////// OnComposingError /////////////////////////////////////////////////////////////////////////////////////

func Resolver

func Resolver(i *invokable, val reflect.Value) *resolver

///////////////////////////////////////////////////////////////////////////////////// Resolver initializes and returns a new Resolver object /////////////////////////////////////////////////////////////////////////////////////

Types

type Deferred

type Deferred struct {
	// contains filtered or unexported fields
}

func Defer

func Defer(init ...interface{}) *Deferred

///////////////////////////////////////////////////////////////////////////////////// Defer creates a Deferred datatype. A Deferred can be resolved by value(s), func(s) Promise or Deferred. /////////////////////////////////////////////////////////////////////////////////////

func (*Deferred) Done

func (d *Deferred) Done() []interface{}

///////////////////////////////////////////////////////////////////////////////////// Done /////////////////////////////////////////////////////////////////////////////////////

func (*Deferred) OnProgress

func (d *Deferred) OnProgress(progressFunc ProgressFunc) *Deferred

///////////////////////////////////////////////////////////////////////////////////// OnProgress /////////////////////////////////////////////////////////////////////////////////////

func (*Deferred) Reject

func (d *Deferred) Reject(err error)

///////////////////////////////////////////////////////////////////////////////////// Reject /////////////////////////////////////////////////////////////////////////////////////

func (*Deferred) Resolve

func (d *Deferred) Resolve(init ...interface{})

///////////////////////////////////////////////////////////////////////////////////// Resolve /////////////////////////////////////////////////////////////////////////////////////

func (*Deferred) Then

func (d *Deferred) Then(init ...interface{}) *Deferred

///////////////////////////////////////////////////////////////////////////////////// Deferred Then /////////////////////////////////////////////////////////////////////////////////////

type ErrorFunc

type ErrorFunc func(err error)

type Invokable

type Invokable interface {
	// contains filtered or unexported methods
}

type OnResolveFunc

type OnResolveFunc func([]reflect.Value)

type ProgressFunc

type ProgressFunc func(data interface{})

type Progressor

type Progressor interface {
	Notify(data interface{})
}

type Promised

type Promised struct {
	// contains filtered or unexported fields
}

func Promise

func Promise(init ...interface{}) *Promised

///////////////////////////////////////////////////////////////////////////////////// Promise /////////////////////////////////////////////////////////////////////////////////////

func (*Promised) Done

func (p *Promised) Done() []interface{}

///////////////////////////////////////////////////////////////////////////////////// Done /////////////////////////////////////////////////////////////////////////////////////

func (*Promised) Finally

func (p *Promised) Finally(init interface{})

///////////////////////////////////////////////////////////////////////////////////// Finally /////////////////////////////////////////////////////////////////////////////////////

func (*Promised) OnProgress

func (p *Promised) OnProgress(progressFunc ProgressFunc) *Promised

///////////////////////////////////////////////////////////////////////////////////// OnProgress /////////////////////////////////////////////////////////////////////////////////////

func (*Promised) Then

func (p *Promised) Then(init ...interface{}) *Promised

///////////////////////////////////////////////////////////////////////////////////// Promise Then /////////////////////////////////////////////////////////////////////////////////////

Jump to

Keyboard shortcuts

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