concurrent

package
v0.0.0-...-b26f218 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ctx Ctx, cancel func(), services ...func(Ctx) error) (err error)

Serve runs given services in parallel until either ctx.Done or any service exits, then it call cancel and wait until all services will exit. Returns error of first service which returned non-nil error, if any.

Types

type Ctx

type Ctx = context.Context

Ctx is a synonym for convenience.

type SetupFunc

type SetupFunc func(Ctx) (interface{}, error)

SetupFunc is described in Setup.

Jump to

Keyboard shortcuts

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