Documentation
¶
Overview ¶
Package urgency computes how "stale" a task is from the time it has dwelt in its current pipeline stage, expressed as a 0..1 intensity for colour ramps.
It is intentionally pure: it depends only on the standard library so it can be table-tested in isolation and reused by both the dashboard and the pipeline screen. The mapping from a stage's configured window to a duration, and from a config string to a Curve, lives in internal/config so this package never imports config (avoiding an import cycle).
Index ¶
Constants ¶
const ( EasingLinear = "linear" EasingEaseIn = "ease-in" EasingEaseInStrong = "ease-in-strong" )
Easing names accepted in team config (dashboard.urgency.easing).
Variables ¶
This section is empty.
Functions ¶
func Ease ¶
Ease shapes a raw fraction r into a display intensity using curve. All curves satisfy Ease(0)=0 and Ease(1)=1 and are monotonic non-decreasing in r; the eased curves are convex (gentle early, sharp late). For equal r the ordering is EaseInStrong ≤ EaseIn ≤ Linear.
func EasingNames ¶
func EasingNames() []string
EasingNames lists the recognised easing names in declaration order. Used for lint validation and did-you-mean suggestions.
Types ¶
type Curve ¶
type Curve int
Curve selects how the raw dwell fraction is shaped into a display intensity.
func ParseCurve ¶
ParseCurve resolves an easing name to a Curve. An empty string yields the default (EaseIn). ok is false for an unrecognised name, in which case the returned Curve is the default.