indexworker

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAdvisoryLockAlreadyAcquired = errors.New("advisory lock already acquired by another process")

ErrAdvisoryLockAlreadyAcquired is returned when another process already holds the advisory lock

View Source
var ErrExtensionNotFound = errors.New("extension not found")

Functions

func CreateIndexes

func CreateIndexes(ctx context.Context, config *conf.GlobalConfiguration, le *logrus.Entry) error

CreateIndexes ensures that the necessary indexes on the users table exist. If the indexes already exist and are valid, it skips creation. It uses a Postgres advisory lock to prevent concurrent index creation by multiple processes. Returns an error either from index creation failure (partial or complete) or if the advisory lock could not be acquired.

Types

type Outcome

type Outcome string
const (
	OutcomeSuccess Outcome = "success"
	OutcomeFailure Outcome = "failure"
	OutcomeSkipped Outcome = "skipped"
)

Jump to

Keyboard shortcuts

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