record

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: 11 Imported by: 0

Documentation

Overview

Package record holds the record-stage queue controller. It consumes Record messages (a request id) published by buildsignal once a build reaches a terminal status, and turns that outcome into durable validation state. See doc/rfc/stovepipe/steps/record.md.

Phase 1 records only the queue's last-green bookmark, which process reads to choose an incremental build baseline. Validation facts and downstream hooks are not implemented yet.

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 consumes Record messages and advances the queue's last-green bookmark when the request's build succeeded. Implements consumer.Controller.

func NewController

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

NewController creates a new record controller.

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 loads the request referenced by the delivery and, when its build succeeded, advances the queue's last-green bookmark. Returns nil to ack (success) or an error to nack (retry) / reject (DLQ).

buildsignal stamps the outcome on the request before publishing here, so a request without a build outcome is a producer invariant violation rather than a state this stage waits for.

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