package background

import "github.com/ydb-platform/ydb-go-sdk/v3/internal/background"

Index

Variables

var ErrAlreadyClosed = errors.New("background worker already closed")

Types

type Worker

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

A Worker must not be copied after first use

func NewWorker

func NewWorker(parent context.Context) *Worker

func (*Worker) Close

func (b *Worker) Close(ctx context.Context, err error) error

func (*Worker) Context

func (b *Worker) Context() context.Context

func (*Worker) Done

func (b *Worker) Done() <-chan struct{}

func (*Worker) Start

func (b *Worker) Start(name string, f func(ctx context.Context))

Source Files

worker.go

Version
v3.37.4
Published
Aug 31, 2022
Platform
linux/amd64
Imports
8 packages
Last checked
5 minutes ago

Tools for package owners.