future

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetHTTPClient

func SetHTTPClient(client *http.Client)

Types

type Future

type Future[T any] interface {
	Wait() (*T, error)
}

func New

func New[T any](ctx context.Context, fn func() (T, error)) Future[T]

func NewHTTP

func NewHTTP[T any](ctx context.Context, req *http.Request, fn func(resp *http.Response, err error) (*T, error)) Future[T]

Jump to

Keyboard shortcuts

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