Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNodeIdFor ¶
func GetNodeIdFor(res schema.GroupVersionResource, i *unstructured.Unstructured) string
Types ¶
type GraphBuilder ¶
type GraphBuilder interface {
BuildGraph(string, string, string) (*Node, []*unstructured.Unstructured, error)
}
type GraphPrinter ¶
type GraphPrinter struct {
// contains filtered or unexported fields
}
GraphPrinter is able to print graph definition in Graphviz dot format.
func (*GraphPrinter) Print ¶
func (p *GraphPrinter) Print(nodes []*Node) error
Print prints graph definition in Graphviz dot format for a given root node.
type KubeGraphBuilder ¶
type KubeGraphBuilder struct {
// contains filtered or unexported fields
}
KubeGraphBuilder enables building graphs between kubernetes objects with the relations defined by objects.
func NewKubeGraphBuilder ¶
func NewKubeGraphBuilder(client dynamic.Interface, restMapper meta.RESTMapper) *KubeGraphBuilder
NewKubeGraphBuilder returns a KubeGraphBuilder ready for building graphs.
func (*KubeGraphBuilder) BuildGraph ¶
func (g *KubeGraphBuilder) BuildGraph(name, namespace, groupRes string) (root *Node, traversed []*Node, err error)
BuildGraph builds a graphs for the object, whose name, namespace and groupRes provided as input. This method returns the root node as well as the traversed array of nodes.
type Node ¶
type Node struct { Instance *unstructured.Unstructured GVR schema.GroupVersionResource Relateds []*Node State NodeState }
func NewNode ¶
func NewNode(res schema.GroupVersionResource, instance *unstructured.Unstructured) *Node
type SimplePrinter ¶
type SimplePrinter struct {
// contains filtered or unexported fields
}
SimplePrinter is able to print tabbed overview and details.
func NewSimplePrinter ¶
func NewSimplePrinter() *SimplePrinter
NewSimplePrinter returns a SimplePrinter
func (*SimplePrinter) Print ¶
func (p *SimplePrinter) Print(nodes []*Node) error
Prints prints tabbed overview and details in order for a given array of nodes.