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)
- type Entry
- type Flow
- func (f Flow) Delivered() string
- 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
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.
var GenericSteps = []string{
"audit", "brainstorm", "capture", "catchup", "cleanup", "commit", "debug", "demo", "deploy", "explain",
"fetch", "finish", "handoff", "implement", "judge", "plan", "pr", "push", "resolve", "review", "standup",
}
GenericSteps is every generic step a flow entry may name, plus finish, which drive runs. 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.
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) 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) UnmarshalJSON ¶
UnmarshalJSON reads what MarshalJSON writes.