async

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name(parts ...string) string

Types

type Async

type Async interface {
	func() |
		func() error |
		func(ctx context.Context) |
		func(ctx context.Context) error |
		func(ctx context.Context) (any, error) |
		func(ctx context.Context, args any) |
		func(ctx context.Context, args any) error |
		func(ctx context.Context, args any) (any, error)
}

type Fn

type Fn func(ctx context.Context, args any) (any, error)

type Manifest

type Manifest struct {
	Name string
	ID   xid.ID
	Fn   Fn
}

func Of

func Of[S Async](name string, schedulable S) Manifest

type Pollable

type Pollable interface {
	Poll(ctx context.Context) (any, error)
}

Jump to

Keyboard shortcuts

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