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 merge queue messages. It loads every request in a batch, hands the resulting list of Changes to the configured Pusher, and transitions the batch to a terminal state based on the Pusher's outcome. After updating state it forwards the batch to conclude (so requests pick up the outcome) and to speculate (so downstream batches can re-plan).
Conflicts are user-caused: the batch goes to BatchStateFailed and the queue message is acked. Any other Pusher error is treated as transient infra: the batch is left in place and the message is nacked.
func NewController ¶
func NewController( logger *zap.SugaredLogger, scope tally.Scope, store storage.Storage, registry consumer.TopicRegistry, pushers pusher.Factory, topicKey consumer.TopicKey, consumerGroup string, ) *Controller
NewController creates a new merge 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 ¶
Process performs the merge for a batch and forwards it to conclude/speculate. 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.