Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultConfig = Config{ GraphName: "vistio", } DefaultNodeMapping = NodeMapping{ Label: "", Regex: MustNewRegexp("(.*)"), Replacement: "$1", Class: "default", } DefaultClass = Class{ Name: "default", Color: "rgb(186, 213, 237)", } )
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { Cluster string `yaml:"cluster"` MaxVolume float64 `yaml:"maxVolume,omitempty"` Connections []*Connection `yaml:"serviceConnections,omitempty"` NodeNotices []*NodeNotice `yaml:"serviceNotices,omitempty"` }
type Config ¶
type Config struct { GraphName string `yaml:"graphName"` GlobalLevel GlobalLevel `yaml:"globalLevel"` ClusterLevel []*Cluster `yaml:"clusterLevel"` Classes []*Class `yaml:"classes,omitempty"` }
type Connection ¶
type Connection struct { Query string `yaml:"query,omitempty"` PrometheusURL string `yaml:"prometheusURL,omitempty"` Source *NodeMapping `yaml:"source,omitempty"` Target *NodeMapping `yaml:"target,omitempty"` Status *Status `yaml:"status,omitempty"` Notices []*ConnectionNotice `yaml:"notices,omitempty"` }
func (*Connection) FormatPromQL ¶
func (c *Connection) FormatPromQL(pql string) string
func (*Connection) QueryLink ¶
func (c *Connection) QueryLink() string
type ConnectionNotice ¶
type GlobalLevel ¶
type GlobalLevel struct { MaxVolume float64 `yaml:"maxVolume,omitempty"` Connections []*Connection `yaml:"clusterConnections,omitempty"` }
type NodeMapping ¶
type NodeMapping struct { Label string `yaml:"label,omitempty"` Regex Regexp `yaml:"regex,omitempty"` Replacement string `yaml:"replacement,omitempty"` Class string `yaml:"class,omitempty"` }
func (*NodeMapping) UnmarshalYAML ¶
func (nm *NodeMapping) UnmarshalYAML(unmarshal func(interface{}) error) error
type NodeNotice ¶
type NodeNotice struct { Title string `yaml:"title"` SubTitle string `yaml:"subtitle"` Link string `yaml:"link"` Query string `yaml:"query,omitempty"` PrometheusURL string `yaml:"prometheusURL,omitempty"` SeverityThreshold SeverityThreshold `yaml:"severityThreshold"` Service *NodeMapping `yaml:"service,omitempty"` }
func (*NodeNotice) QueryLink ¶
func (nn *NodeNotice) QueryLink() string
type SeverityThreshold ¶
Click to show internal directories.
Click to hide internal directories.