CumulativeCapRule
A cap on time in statuses since the last reset: “11 hours driving since 10 hours off”.
import type { CumulativeCapRule } from "@northguild/gmt";Members
Section titled “Members”| Member | Type | Description |
|---|---|---|
label | string | The caller’s name for the rule. The report is keyed by it; labels must be unique. |
severity? | "violation" | "advisory" (DutySeverity) | Whether a failure is a violation or an advisory. |
kind | "cumulativeCap" | Selects this rule kind. |
statuses | S[] | The statuses whose time is capped. |
cap | string | The most time allowed, a positive ISO 8601 duration of exact time. |
since | Reset<S> (Reset) | The rest that starts the count again. |
Definition
Section titled “Definition”type CumulativeCapRule<S extends string = string> = { /** The caller's name for the rule. The report is keyed by it; labels must be unique. */ label: string; /** * Whether a failure is a violation or an advisory. * * @defaultValue `"violation"`. */ severity?: DutySeverity; /** Selects this rule kind. */ kind: "cumulativeCap"; /** The statuses whose time is capped. */ statuses: S[]; /** The most time allowed, a positive ISO 8601 duration of exact time. */ cap: string; /** The rest that starts the count again. */ since: Reset<S>;};