Documentation ¶
Index ¶
- func Await(p *Promise) (interface{}, error)
- type Interval
- type Promise
- func All(promises ...*Promise) *Promise
- func AllSettled(promises ...*Promise) *Promise
- func Async(executor func(resolve func(interface{}), reject func(interface{}))) *Promise
- func Each(promises ...*Promise) *Promise
- func Race(promises ...*Promise) *Promise
- func Reject(err error) *Promise
- func Resolve(resolution interface{}) *Promise
- func (this *Promise) AsCallback(f func(interface{}, error))
- func (this *Promise) Await() (interface{}, error)
- func (this *Promise) CalTime() *Promise
- func (this *Promise) Catch(rejection func(err error) interface{}) *Promise
- func (this *Promise) Elapse() time.Duration
- func (this *Promise) Reject(err interface{})
- func (this *Promise) Resolve(resolution interface{})
- func (this *Promise) Then(fulfillment func(data interface{}) interface{}) *Promise
- type Timeout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Promise ¶
type Promise struct {
// contains filtered or unexported fields
}
func AllSettled ¶
func Async ¶
func Async(executor func(resolve func(interface{}), reject func(interface{}))) *Promise
func (*Promise) AsCallback ¶
Click to show internal directories.
Click to hide internal directories.