batch

package
v0.3.0-20261006170529-... Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 15 Imported by: ? 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

This section is empty.

Types

type Controller

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

Controller handles batch queue messages. It consumes validated requests, mints a batch for each, and hands it to the dependency-analysis stage. Implements consumer.Controller interface for integration with the consumer.

func NewController

func NewController(
	logger *zap.SugaredLogger,
	scope tally.Scope,
	registry consumer.TopicRegistry,
	counters counter.Factory,
	stores orchstorage.Factory,
	topicKey consumer.TopicKey,
	consumerGroup string,
) *Controller

NewController creates a new batch controller for the orchestrator.

func (*Controller) ConsumerGroup

func (c *Controller) ConsumerGroup() string

ConsumerGroup returns the consumer group for offset tracking.

func (*Controller) Name

func (c *Controller) Name() string

Name returns the controller name for logging and metrics.

func (*Controller) Process

func (c *Controller) Process(ctx context.Context, delivery consumer.Delivery) error

Process processes a batch delivery from the queue. Mints a batch for the request and hands it to the dependency-analysis topic, which decides whether that batch is the one that enrols the request. Returns nil to ack (success), or error to nack (retry).

func (*Controller) TopicKey

func (c *Controller) TopicKey() consumer.TopicKey

TopicKey returns the topic key this controller subscribes to.

Jump to

Keyboard shortcuts

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