mergesignal

package
v0.3.0-20260807201250-... Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package mergesignal consumes merge results from runway's merge-signal queue, correlates them to the batch by the echoed id, and transitions the batch to a terminal state — Succeeded when runway merged the batch, Failed when it could not — then fans the batch out to conclude (so member requests pick up the outcome) and speculate (so dependents can re-plan). Like mergeconflictsignal it is purely result-driven — runway pushes the result, so there is no poll loop or self-reschedule.

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 mergesignal queue messages. Implements consumer.Controller.

func NewController

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

NewController creates a new mergesignal 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 consumes a runway merge result and advances or fails the batch. Returns nil to ack, or error to nack/reject.

A not-merged verdict is an expected outcome of the merge, not a failure: the batch is driven to terminal Failed inline and the message is acked. Only infrastructure faults — deserialize, storage, the state transition, and the fan-out publishes — return an error and reject to the DLQ, where the batch is reconciled to Failed.

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