coordinationwire

package
v0.59.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 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 coordinationwire is a coordination parent's filtered view (coordinationview.View) as its JSON reads, without the Task CRD's types: the fields its flow, its card lines and a chat channel's projection read, decoded from the same bytes the broker serves. It is a leaf free of Kubernetes, so roomview and the chat adapter render a family without importing the factory. FlowOf is the one derivation of flow.coordination; coordinationview delegates to it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlowOf

func FlowOf(v View) *summary.CoordinationFlow

FlowOf is v's flow.coordination.

Types

type Artifact

type Artifact struct {
	ChildID string `json:"childID"`
	Name    string `json:"name"`
}

Artifact is a landed artifact.

type Attempt

type Attempt struct {
	Purpose string `json:"purpose"`
	State   string `json:"state"`
	Reason  string `json:"reason"`
}

Attempt is one integration attempt.

type Authorization

type Authorization struct {
	ChildID          string `json:"childID"`
	ChildFingerprint string `json:"childFingerprint"`
	PlanVersion      int32  `json:"planVersion"`
}

Authorization is one child's authorization, at a plan version and a child fingerprint.

type Budget

type Budget struct {
	TotalMicroUSD              int64 `json:"totalMicroUSD"`
	PlanningSettledMicroUSD    int64 `json:"planningSettledMicroUSD"`
	ChildrenSettledMicroUSD    int64 `json:"childrenSettledMicroUSD"`
	IntegrationSettledMicroUSD int64 `json:"integrationSettledMicroUSD"`
}

Budget is the family's visible spend and ceiling.

type Child

type Child struct {
	ID                 string   `json:"id"`
	Repository         string   `json:"repository"`
	Task               string   `json:"task"`
	Room               string   `json:"room"`
	IssueURL           string   `json:"issueURL"`
	PRURL              string   `json:"prURL,omitempty"`
	Phase              string   `json:"phase"`
	Reason             string   `json:"reason"`
	Fingerprint        string   `json:"fingerprint"`
	HeadSHA            string   `json:"headSHA,omitempty"`
	IntegrationRelease *Release `json:"integrationRelease,omitempty"`
}

Child is one filed child as the view shows it.

type Confirmation

type Confirmation struct {
	PlanHash string `json:"planHash"`
}

Confirmation is the parent's confirmation, at the plan hash it confirmed.

type Consumer

type Consumer struct {
	From     string `json:"from"`
	Artifact string `json:"artifact"`
	Required bool   `json:"required"`
}

Consumer is an artifact a child consumes from another.

type Integration

type Integration struct {
	Role             string `json:"role"`
	BeforeDependents *bool  `json:"beforeDependents,omitempty"`
}

Integration is the family's integration plan; a nil BeforeDependents is true (MR9).

func (Integration) EffectiveBeforeDependents

func (i Integration) EffectiveBeforeDependents() bool

EffectiveBeforeDependents is whether a dependent merge waits for a passing integration.

type Plan

type Plan struct {
	ID          string      `json:"id"`
	Title       string      `json:"title"`
	Version     int32       `json:"version"`
	Primary     Primary     `json:"primary"`
	Children    []PlanChild `json:"children"`
	Integration Integration `json:"integration"`
}

Plan is the CoordinationPlan's read model: its id, title, version, primary, children and integration.

type PlanChild

type PlanChild struct {
	ID         string     `json:"id"`
	Repository string     `json:"repository"`
	Roles      []string   `json:"roles"`
	DependsOn  []string   `json:"dependsOn,omitempty"`
	Consumes   []Consumer `json:"consumes,omitempty"`
}

PlanChild is one planned child: its id, repository, roles and what it waits on.

type Primary

type Primary struct {
	Repository string `json:"repository"`
}

Primary is the plan's primary repository.

type Recovery

type Recovery struct {
	Code    string `json:"code"`
	ChildID string `json:"childID,omitempty"`
}

Recovery is the parent's one proposed recovery.

type Release

type Release struct {
	HeadSHA string `json:"headSHA"`
}

Release is the head a passing integration released.

type View

type View struct {
	ParentTask          string          `json:"parentTask"`
	Phase               string          `json:"phase"`
	Reason              string          `json:"reason"`
	Plan                Plan            `json:"plan"`
	PlanHash            string          `json:"planHash"`
	ParentConfirmation  *Confirmation   `json:"parentConfirmation,omitempty"`
	ChildAuthorizations []Authorization `json:"childAuthorizations"`
	Children            []Child         `json:"children"`
	Artifacts           []Artifact      `json:"artifacts"`
	IntegrationAttempts []Attempt       `json:"integrationAttempts"`
	Budget              Budget          `json:"budget"`
	Recovery            *Recovery       `json:"recovery,omitempty"`
	RestrictedChildren  int             `json:"restrictedChildren"`
}

View is the filtered view's read model. Its JSON names are coordination.CoordinationView's and coordinationview.View's; a field the readers here never read is left out and ignored on decode.

func Of

func Of(raw json.RawMessage) (View, bool)

Of decodes a summary's coordination JSON; false when there is none or it does not decode.

Jump to

Keyboard shortcuts

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