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 local validation checks (duplicate detection via the change store and change metadata fetch), then kicks off the asynchronous merge-conflict check by publishing the full check request to runway's merge-conflict-check queue. Validation logic is extensible to support additional checks. Implements consumer.Controller.
func NewController ¶
func NewController( logger *zap.SugaredLogger, scope tally.Scope, stores storage.Factory, registry consumer.TopicRegistry, changeProviders changeprovider.Factory, validators validator.Factory, runwayTopicKey consumer.TopicKey, topicKey consumer.TopicKey, consumerGroup string, ) *Controller
NewController creates a new validate controller for the orchestrator. runwayTopicKey is the runway-owned topic the merge-conflict check request is published to (TopicKeyMergeConflictCheck). validators is an optional factory for custom validation checks; pass nil to skip.
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 ¶
Process processes a validate delivery from the queue. Runs duplicate detection, change metadata fetch, and change claiming, then kicks off the asynchronous merge-conflict check by publishing the full check request to runway. 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.