async

package
v0.1.322 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 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[T any](fn func(async.Promise[T])) async.Future[T]

ExecuteWithPromiseAsync ...

Types

type AsyncResponse

type AsyncResponse struct {
	Message string
	Error   error
}

AsyncResponse ...

type FutureResponse added in v0.1.319

type FutureResponse struct {
	Err   error
	Value interface{}
}

FutureResponse ...

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[FutureResponse]

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