Documentation
¶
Overview ¶
Package flow is the grammar of a flow entry, `step:arg[label]`, and the predicates every reader of a flow shares. It imports nothing of f10's, so facts, state and timing can all depend on it.
Index ¶
- Variables
- func CutLabel(s string) (string, string)
- func StepsOf(c StepClass) []string
- type Entry
- type Flow
- func (f Flow) Delivered() string
- func (f Flow) Finishes() bool
- func (f Flow) JudgeKind(i int) string
- func (f Flow) Labels() []string
- func (f Flow) MarshalJSON() ([]byte, error)
- func (f Flow) Plans() bool
- func (f Flow) PublishedBefore(i int) bool
- func (f Flow) Ship() Flow
- func (f Flow) Strings() []string
- func (f *Flow) UnmarshalJSON(b []byte) error
- func (f Flow) Written() []string
- type StepClass
Constants ¶
This section is empty.
Variables ¶
var Delivering = []string{"implement", "commit", "push", "pr", "deploy"}
Delivering are the generic steps whose output is a run's shipment.
GenericSteps is every generic step a flow entry may name. A label never takes one of these names, so status and stats never show a step that did not run.
var Guarded = []string{"implement", "pr", "judge"}
Guarded are the entries ship's catchup guard runs before.
var Steps = map[string]StepClass{ "implement": EntryStep, "judge": EntryStep, "cleanup": EntryStep, "commit": EntryStep, "push": EntryStep, "pr": EntryStep, "review": EntryStep, "demo": EntryStep, "deploy": EntryStep, "handoff": EntryStep, "finish": EntryStep, "capture": Planning, "capture-adapter": Planning, "fetch": Planning, "investigate": Planning, "stale": Planning, "debug": Planning, "plan": Planning, "catchup": Part, "ci": Part, "resolve": Part, "review-ci": Part, "review-host": Part, "review-local": Part, "audit": Own, "brainstorm": Own, "explain": Own, "standup": Own, }
Steps is every generic step and its class, finish included, which drive runs rather than ship. A new step file fails a test until it has a row.
Functions ¶
Types ¶
type Entry ¶
An Entry is one flow entry: `review:local[deep-review]` is step review, argument local, label deep-review. The label is a display name only.
type Flow ¶
type Flow []Entry
A Flow is entries in the order they run.
func Zip ¶
Zip is a flow from the colon-form entries and their labels by index, the two lines a state file keeps; a missing label is "".
func (Flow) Finishes ¶ added in v0.64.0
Finishes reports a flow ending in `finish`, which drive runs after ship.
func (Flow) JudgeKind ¶
JudgeKind is what the judge at entry i judges: the plan before any `implement`, the change after one.
func (Flow) MarshalJSON ¶
MarshalJSON writes the flow as its written entries, labels in brackets.
func (Flow) Plans ¶
Plans reports a flow led by `plan`: it writes a plan file, and ship runs only the entries after it.
func (Flow) PublishedBefore ¶
PublishedBefore reports a pr or push among the entries before i, which a CI review needs.
func (Flow) Ship ¶
Ship is what /f10:ship runs: the flow after a leading `plan`, without the trailing `finish` drive runs itself.
func (*Flow) UnmarshalJSON ¶
UnmarshalJSON reads what MarshalJSON writes.
type StepClass ¶ added in v0.65.0
type StepClass int
A StepClass says where a generic step is loaded, which is what the badge hook needs to tell a ship entry from a step loaded on the way to one.
const ( // EntryStep is a flow entry ship loads alone, right before it runs. EntryStep StepClass = iota // Planning is loaded before a pipeline runs, never as a pipeline step. Planning // Part is loaded inside an entry and runs under its badge: a review's // parts, the catchup guard, the red-checks path. Part // Own runs only from its own skill, never inside ship. Own )