Documentation
¶
Overview ¶
Package netview pkg/visor/netview/netview.go c3-vis-core
The network-view table (SD services + TPD per-key transport counts + UT uptimes aggregated per-PK), shared by the native visor (pkg/visor) and the wasm-visor (cmd/wasm-visor). It is a near-leaf — only the stdlib (encoding/json + sort + strings + time) plus the wasm-safe tptypes leaf (the canonical transport-type list) — so the wasm-visor can import it; pkg/visor itself does NOT compile for js/wasm. Keeping the aggregation here means the native and browser visors can't drift on how the table is built.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
PK string `json:"pk"`
Country string `json:"country,omitempty"`
Version string `json:"version,omitempty"`
Services string `json:"services,omitempty"`
STCPR int `json:"stcpr"`
SUDPH int `json:"sudph"`
DMSG int `json:"dmsg"`
STCP int `json:"stcp"`
SQUICR int `json:"squicr"`
WEBRTC int `json:"webrtc"`
SWSR int `json:"swsr"`
SWTR int `json:"swtr"`
Total int `json:"total"`
UTStatus string `json:"ut_status,omitempty"` // "online" | "offline" | "" (not in UT)
}
Entry is one row of the combined network table. JSON tags match what `cli sd --json` emits so callers (UI, scripts) consume both interchangeably.
type Response ¶
Response is the /api/network-view payload.
func Compute ¶
Compute aggregates SD (proxy/vpn/visor) + TPD all-transports + UT uptimes into the per-PK table, via the supplied deployment-service fetch (service ∈ {sd,tpd,ut}, path → raw JSON). A partial failure on any source is treated as an empty slice — the table renders with whatever was reachable.