Documentation
¶
Overview ¶
Package manager runs one merge-queue engine per discovered (repo, base), discovering opt-in repos by topic and ensuring their branch protection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Topic string
StatusCtx string
MergeStyle string
MaxBatch int
BatchLinger time.Duration
BatchTarget int
BisectFanout int
QueueComments bool
WebhookURL string
WebhookSecret string
InstanceURL string
PublicURL string
Token string
BotUser string
BotEmail string
Metrics *metrics.Collector
Checkpoint engine.CheckpointStore
Lease engine.QueueLease
LeaseHolderID string
LeaseTTL time.Duration
Logger *slog.Logger
EngineLogger *slog.Logger
// MaxConcurrentReconciles caps how many engines may be reconciled
// concurrently in a single Tick pass. Values ≤ 0 or 1 preserve today's
// serial behaviour exactly. Values > 1 enable cross-repo parallelism.
MaxConcurrentReconciles int
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) Refresh ¶
Refresh discovers topic repos and registers an engine per configured (repo, base), ensuring branch protection on first sight.
func (*Manager) Tick ¶
Tick reconciles every managed queue, bounded to m.maxConcurrent concurrent engines at a time. The default (maxConcurrent == 1) is serial and preserves exactly the same behaviour as the original single-goroutine loop.
Invariants:
- At most one Reconcile call is ever in flight for a given engine at once. If a previous tick's Reconcile is still running (TryLock fails), this tick is skipped for that engine with a warning; this means SHUNT_POLL_INTERVAL is too short relative to the actual reconcile duration.
- Tick blocks until every goroutine it started has returned, so the caller (the reconcile loop) can safely call Refresh immediately afterwards.
Click to show internal directories.
Click to hide internal directories.