Documentation
¶
Overview ¶
Package checkpoint defines durable queue snapshot types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveBatchSnapshot ¶
type ActiveBatchSnapshot struct {
PRs []PullRequestSnapshot `json:"PRs"`
StagingBranch string `json:"StagingBranch"`
StagingSHA string `json:"StagingSHA"`
BaseGeneration int `json:"BaseGeneration"`
Outcome string `json:"Outcome"`
}
ActiveBatchSnapshot records a staging branch currently waiting on its gate. Restores re-queue active batches for fresh staging instead of trusting an old run from before the process restart.
type PullRequestSnapshot ¶
PullRequestSnapshot is the PR identity needed to resume a staged batch.
type QueueKey ¶
type QueueKey struct {
Owner string `json:"Owner"`
Repo string `json:"Repo"`
Base string `json:"Base"`
}
QueueKey identifies a single merge queue.
type QueueSnapshot ¶
type QueueSnapshot struct {
Key QueueKey `json:"Key"`
Pending [][]int `json:"Pending"`
Active []ActiveBatchSnapshot `json:"Active"`
LingerSince time.Time `json:"LingerSince"`
BaseGeneration int `json:"BaseGeneration"`
StagingSequence int `json:"StagingSequence"`
}
QueueSnapshot is the durable shape of queue state.
func (QueueSnapshot) Clone ¶
func (s QueueSnapshot) Clone() QueueSnapshot
Clone returns a deep copy of the snapshot.
func (QueueSnapshot) Validate ¶
func (s QueueSnapshot) Validate() error
Validate checks the snapshot before it is persisted or restored.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bolt provides a bbolt-backed queue checkpoint store.
|
Package bolt provides a bbolt-backed queue checkpoint store. |
|
Package postgres provides a database/sql-backed Postgres queue checkpoint store.
|
Package postgres provides a database/sql-backed Postgres queue checkpoint store. |
Click to show internal directories.
Click to hide internal directories.