feat: add standalone server topology view
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
package models
|
||||
|
||||
// TopologyEvidence contains static source artifacts which add relationships
|
||||
// that the Reanimator inventory schema cannot express. It is deliberately not
|
||||
// serialized into reanimator.json.
|
||||
type TopologyEvidence struct {
|
||||
DIMMType17 string
|
||||
StorageMap string
|
||||
NVIDIAQueryCSV string
|
||||
NVIDIATopology string
|
||||
NVLinkStatus string
|
||||
NVLinkErrors string
|
||||
}
|
||||
|
||||
// TopologyDocument is the standalone, versioned topology.json contract.
|
||||
// Coordinates are presentation details and are intentionally not persisted.
|
||||
type TopologyDocument struct {
|
||||
Version string `json:"version"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Nodes []TopologyNode `json:"nodes,omitempty"`
|
||||
Edges []TopologyEdge `json:"edges,omitempty"`
|
||||
}
|
||||
|
||||
type TopologyNode struct {
|
||||
ID string `json:"id"`
|
||||
Kind string `json:"kind"`
|
||||
Label string `json:"label"`
|
||||
Model string `json:"model,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
Socket *int `json:"socket,omitempty"`
|
||||
NUMANode *int `json:"numa_node,omitempty"`
|
||||
BDF string `json:"bdf,omitempty"`
|
||||
Count int `json:"count,omitempty"`
|
||||
SizeMB int `json:"size_mb,omitempty"`
|
||||
WattageW int `json:"wattage_w,omitempty"`
|
||||
LinkSpeed string `json:"link_speed,omitempty"`
|
||||
MaxLinkSpeed string `json:"max_link_speed,omitempty"`
|
||||
}
|
||||
|
||||
type TopologyEdge struct {
|
||||
From string `json:"from"`
|
||||
To string `json:"to"`
|
||||
Kind string `json:"kind"`
|
||||
Status string `json:"status,omitempty"`
|
||||
Label string `json:"label,omitempty"`
|
||||
Links int `json:"links,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user