tasks

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LaunchConsumers

func LaunchConsumers(ctx context.Context, queuesProvider queues.Provider, cfg *deltaconfig.DeltaGenerationConfig, workerMetrics *worker.WorkerCollector, log logrus.FieldLogger, wiring *ConsumerWiring) error

LaunchConsumers starts Redis consumers on the delta-generation task queue.

Types

type Consumer

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

Consumer handles incoming jobs from the delta-generation task queue.

func NewConsumer

func NewConsumer(cfg *deltaconfig.DeltaGenerationConfig, workerMetrics *worker.WorkerCollector, log logrus.FieldLogger, wiring *ConsumerWiring) *Consumer

NewConsumer creates a new Consumer instance.

func (*Consumer) Consume

func (c *Consumer) Consume(ctx context.Context, payload []byte, entryID string, consumer queues.QueueConsumer, log logrus.FieldLogger) error

Consume handles a single queue message.

type ConsumerWiring

type ConsumerWiring struct {
	Preparer        PrepareDeltasHandler
	Generator       GenerateDeltaHandler
	Completion      GenerationCompleteHandler
	PrepareComplete PrepareCompleteHandler
}

ConsumerWiring configures the task handlers used by the generic consumer.

type GenerateDeltaHandler

type GenerateDeltaHandler interface {
	Handle(ctx context.Context, ev worker_client.EventWithOrgId, log logrus.FieldLogger) error
}

type GenerationCompleteHandler

type GenerationCompleteHandler interface {
	Handle(context.Context, worker_client.EventWithOrgId) error
}

type PrepareCompleteHandler

type PrepareCompleteHandler interface {
	Handle(context.Context, worker_client.EventWithOrgId) error
}

type PrepareDeltasHandler

type PrepareDeltasHandler interface {
	Prepare(ctx context.Context, ev worker_client.EventWithOrgId) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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