background

package
v0.4.21 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package background provides the background service. This service is used to manage the background goroutines in the backend.

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