queueutils

package
v0.49.1-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeBatched added in v0.48.4

func MakeBatched[T any](batchSize int, things []T, fn func(group []T) error) error

Types

type OpMethod

type OpMethod func(ctx context.Context, id string) (bool, error)

type OperationPool

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

func NewOperationPool

func NewOperationPool(ql *zerolog.Logger, timeout time.Duration, description string, method OpMethod) *OperationPool

func (*OperationPool) GetOperation

func (p *OperationPool) GetOperation(id string) *SerialOperation

func (*OperationPool) RunOrContinue

func (p *OperationPool) RunOrContinue(id string)

func (*OperationPool) SetTenants added in v0.49.1

func (p *OperationPool) SetTenants(tenants []*dbsqlc.Tenant)

type SerialOperation

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

SerialOperation represents a method that can only run serially.

func (*SerialOperation) Run

func (o *SerialOperation) Run(ql *zerolog.Logger)

func (*SerialOperation) RunOrContinue

func (o *SerialOperation) RunOrContinue(ql *zerolog.Logger)

Jump to

Keyboard shortcuts

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