Documentation
¶
Index ¶
Constants ¶
View Source
const ( PositionUnknown = iota PositionHub PositionLeaf )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Link ¶
type Link struct {
Lag int
Transit int
*ServerTree
}
type Server ¶
type Server struct {
XMLName xml.Name `xml:"server" json:"-"`
ServerName string `xml:"servername" json:"id"`
ParentName string `xml:"parentname" json:"-"`
Label string `xml:"-" json:"label"`
Lag int `xml:"lagmillisecs" json:"lagmillisecs"`
Users int `xml:"usercount" json:"usercount"`
Transit int `xml:"-" json:"-"`
Description string `xml:"gecos" json:"desc"`
Position int `xml:"-" json:"group"`
}
Server represents the information that can be obtained about a server xml values map to those in the output of inspircd's m_httpd_stats json values map to those used in the JS vizualisation
type ServerTree ¶
ServerTree is a node from a "doubly-linked tree" (a tree where each node has both references to its parent and its children
func (*ServerTree) GetList ¶
func (t *ServerTree) GetList() []Server
GetList is a utility function to return an easily iterable version of the tree
type Servers ¶
type Servers struct {
Root *ServerTree
Lookup map[string]*ServerTree
}
Servers is a helper structure to quickly iterate (in no particular order) on the contents of a ServerTree
func (*Servers) Normalize ¶
Normalize finds a better root than the current one and shifts to there, if it exists ! Normalize destroys transit information
Click to show internal directories.
Click to hide internal directories.