Documentation
¶
Overview ¶
Package flow is a live diagram of what moves through a system: edges between its parts with rate, errors and latency, read as PromQL from the project's metrics component, or simulated for a demo.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Simulate makes the numbers up (every row says so), for a demo without metrics.
Simulate bool `json:"simulate"`
// Source is the metrics component to query (default the first).
Source string `json:"source"`
Nodes []Node `json:"nodes"`
Edges []Edge `json:"edges"`
Types []Type `json:"types"`
// Warn and Err are the error percentages an edge turns warn and err at (default 1 and 5).
Warn float64 `json:"warn"`
Err float64 `json:"err"`
}
type Edge ¶
type Edge struct {
From string `json:"from"`
To string `json:"to"`
Label string `json:"label"`
Rate string `json:"rate"`
Errors string `json:"errors"`
Latency string `json:"latency"`
Sim float64 `json:"sim"`
}
Edge's rate (per second), errors (per second) and latency (ms) are PromQL; Sim is the rate a simulation centres on.
type Row ¶
type Row struct {
From string `json:"from"`
To string `json:"to"`
Node string `json:"node"`
Label string `json:"label"`
Value float64 `json:"value" unit:"/s"`
Errors float64 `json:"errors" unit:"%"`
Latency float64 `json:"latency" unit:"ms"`
Status string `json:"status"`
Simulated bool `json:"simulated"`
}
Row is an edge (from, to) or a node (node) of flow.graph.
Click to show internal directories.
Click to hide internal directories.