Documentation ¶
Overview ¶
Package visualization implements Aptomi policy & resolution data visualization using network-based diagrams for visjs
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DependencyResolutionCfgDefault = &DependencyResolutionCfg{ showTrivialContracts: true, showContracts: false, }
DependencyResolutionCfgDefault is default graph generation parameters for DependencyResolution
var PolicyCfgDefault = &PolicyCfg{ showServiceComponentsOnlyForTopLevel: true, showServiceComponents: true, }
PolicyCfgDefault is default graph generation parameters for Policy
Functions ¶
This section is empty.
Types ¶
type DependencyResolutionCfg ¶
type DependencyResolutionCfg struct {
// contains filtered or unexported fields
}
DependencyResolutionCfg defines graph generation parameters for DependencyResolution
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph is a data structure for visualizing Aptomi objects in a form of a graph with nodes and edges. It gets created by GraphBuilder. Once created, use GetDataJSON() to get the result and feed into vis.js.
func (*Graph) CalcDelta ¶
CalcDelta takes the current graph and modifies it to contain the difference between this graph and the baseline graph
func (*Graph) GetData ¶
func (g *Graph) GetData() interface{}
GetData returns a struct, which can be fed directly into vis.js as network map
func (*Graph) GetDataJSON ¶
GetDataJSON returns a JSON-formatted byte array, which can be fed directly into vis.js as network map
type GraphBuilder ¶
type GraphBuilder struct {
// contains filtered or unexported fields
}
GraphBuilder allows to visualize Aptomi policy and resolution data as a graph It can also render deltas between two visualizations, showing new and deleted objects between policies and resolution data.
func NewGraphBuilder ¶
func NewGraphBuilder(policy *lang.Policy, resolution *resolve.PolicyResolution, externalData *external.Data) *GraphBuilder
NewGraphBuilder returns a graph builder that visualizes policy and resolution data
func (*GraphBuilder) DependencyResolution ¶
func (b *GraphBuilder) DependencyResolution(cfg *DependencyResolutionCfg) *Graph
DependencyResolution produces policy resolution graph by tracing every dependency and displaying what got allocated
func (*GraphBuilder) Object ¶ added in v0.1.12
func (b *GraphBuilder) Object(obj runtime.Object) *Graph
Object produces a graph which represents an object
func (*GraphBuilder) Policy ¶
func (b *GraphBuilder) Policy(cfg *PolicyCfg) *Graph
Policy produces just a policy graph without showing any resolution data