async

package
v0.0.0-...-0776095 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServiceChanFull     = errors.New("async: service chan is full")
	ErrServiceAwaitTimeout = errors.New("async: service await timeout")
)

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, name string,
	size int, timeout time.Duration) *Service

func (*Service) Await

func (s *Service) Await(f func() (any, error)) (res any, err error)

func (*Service) Get

func (s *Service) Get() <-chan func()

func (*Service) Name

func (s *Service) Name() string

func (*Service) Send

func (s *Service) Send(f func() (any, error)) (err error)

Jump to

Keyboard shortcuts

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