merge

package
v0.2.0-dev.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package merge consumes committing merge requests from Runway's merge queue. A request asks Runway to apply an ordered sequence of merge steps onto the merge target and commit the result.

The controller obtains a Merger for the request's merge target, calls Merge, and publishes the MergeResult (with the produced revisions) to the merge-signal queue. A merge conflict is an expected outcome (ack + publish FAILED result), not an infrastructure error.

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.

func NewController

func NewController(p Params) *Controller

NewController creates a new merge controller for the runway service.

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 deserializes the merge request, performs the committing merge, and publishes the result. Returns nil to ack, or an error to nack.

func (*Controller) TopicKey

func (c *Controller) TopicKey() consumer.TopicKey

TopicKey returns the topic key this controller subscribes to.

type Params

type Params struct {
	TopicKey      consumer.TopicKey
	ConsumerGroup string

	MergerFactory merger.Factory
	Registry      consumer.TopicRegistry

	Scope  tally.Scope
	Logger *zap.SugaredLogger
}

Params are the parameters for creating a new merge controller.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL