Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string `json:"name"` DisplayName string `json:"displayName"` Description string `json:"description"` Home bool `json:"home"` Address string `json:"address"` Username string `json:"username"` Password string `json:"password"` Token string `json:"token"` Traffic Traffic `json:"traffic"` }
Config is the structure of the configuration for a single Kiali instance.
type EdgeData ¶
type EdgeData struct { cytoscape.EdgeData EdgeType string `json:"edgeType"` EdgeLabel string `json:"edgeLabel"` }
EdgeData is the https://pkg.go.dev/github.com/kiali/kiali@v1.37.0/graph/config/cytoscape#EdgeData struct plus our additional fields.
type EdgeWrapper ¶
type EdgeWrapper struct {
Data *EdgeData `json:"data"`
}
EdgeWrapper is the https://pkg.go.dev/github.com/kiali/kiali@v1.37.0/graph/config/cytoscape#EdgeWrapper struct.
type Elements ¶
type Elements struct { Nodes []*NodeWrapper `json:"nodes"` Edges []*EdgeWrapper `json:"edges"` }
Elements is the https://pkg.go.dev/github.com/kiali/kiali@v1.37.0/graph/config/cytoscape#Elements struct.
type Graph ¶
type Graph struct {
Elements *Elements `json:"elements"`
}
Graph is the structure of the returned topology graph from Kiali. We have to implement it by ourselve, because we have to add some additional fields, which are required by the React UI.
type Instance ¶
type Instance struct { Name string // contains filtered or unexported fields }
Instance represents a single Kiali instance, which can be added via the configuration file.
func (*Instance) GetGraph ¶
func (i *Instance) GetGraph(ctx context.Context, duration int64, graphType, groupBy string, injectServiceNodes bool, appenders, namespaces []string) (*Graph, error)
GetGraph returns the topology graph from the Kiali API, with some additional fields, which we need to render the graph in our React UI.
func (*Instance) GetMetrics ¶
GetMetrics returns the metrics for an edge or node in the Kiali topology graph.
type NodeData ¶
type NodeData struct { cytoscape.NodeData NodeLabel string `json:"nodeLabel"` NodeLabelFull string `json:"nodeLabelFull"` NodeImage string `json:"nodeImage"` }
NodeData is the https://pkg.go.dev/github.com/kiali/kiali@v1.37.0/graph/config/cytoscape#NodeData struct plus our additional fields.
type NodeWrapper ¶
type NodeWrapper struct {
Data *NodeData `json:"data"`
}
NodeWrapper is the https://pkg.go.dev/github.com/kiali/kiali@v1.37.0/graph/config/cytoscape#NodeWrapper struct.
type ResponseError ¶
type ResponseError struct {
Error string `json:"error"`
}
ResponseError is the structure for a failed Kiali API request.