background

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Background

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

Background is the background service. It is responsible for managing background routines.

func New

func New() *Background

New creates a new background service.

func (*Background) AttachGoroutine

func (b *Background) AttachGoroutine(f func(ctx context.Context))

AttachGoroutine creates a goroutine on a given function and tracks it using the background's WaitGroup.

func (*Background) Close

func (b *Background) Close()

Close closes the background service. This will wait for all goroutines to exit.

Jump to

Keyboard shortcuts

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