async

package
v0.1.299 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteWithPromiseAsync

func ExecuteWithPromiseAsync(fn func(async.Promise[interface{}])) async.Future[interface{}]

ExecuteWithPromiseAsync ...

Types

type AsyncResponse

type AsyncResponse struct {
	Message string
	Error   error
}

AsyncResponse ...

type PromiseResponse added in v0.1.256

type PromiseResponse[T any] struct {
	Future async.Future[T]
	// contains filtered or unexported fields
}

PromiseResponse ...

func ExecuteAsync added in v0.1.256

func ExecuteAsync(f func() (interface{}, error)) *PromiseResponse[interface{}]

ExecuteAsync returns a response that contains a future and a helper method to check if the future has been completed

func (*PromiseResponse[T]) IsComplete added in v0.1.256

func (s *PromiseResponse[T]) IsComplete() bool

IsComplete checks to see if a promise has been completed

Jump to

Keyboard shortcuts

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