validate

package
v0.1.0-dev2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

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 validate queue messages. It consumes requests, performs validation checks (duplicate detection via the change store, merge conflicts, change metadata fetch), and publishes to the batch stage. Validation logic is extensible to support additional checks. Implements consumer.Controller.

func NewController

func NewController(
	logger *zap.SugaredLogger,
	scope tally.Scope,
	store storage.Storage,
	changeStore changestore.ChangeStore,
	registry consumer.TopicRegistry,
	mergeChecker mergechecker.MergeChecker,
	changeProvider changeprovider.ChangeProvider,
	topicKey consumer.TopicKey,
	consumerGroup string,
) *Controller

NewController creates a new validate 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) (retErr error)

Process processes a validate delivery from the queue. Runs duplicate detection, merge-conflict check, change metadata fetch, then publishes to batch. Returns nil to ack (success or non-retryable rejection), 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