kubegraph

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeGraph

type KubeGraph struct {
	// contains filtered or unexported fields
}

KubeGraph graphviz wrapper that creates kubernetes resource graphs

func New

func New() (kubegraph *KubeGraph, err error)

New creates an instance of KubeGraph

func (*KubeGraph) AddStyledNode

func (kgraph *KubeGraph) AddStyledNode(resourceType reflect.Type, resourceObject runtime.Object, nodeName string, resourceName string, icon string) (adapter.Node, error)

AddStyledNode creates a new styled node with the given resource

func (*KubeGraph) ConnectNodes

func (kgraph *KubeGraph) ConnectNodes()

ConnectNodes creates edges between the nodes

func (*KubeGraph) GetNode

func (kgraph *KubeGraph) GetNode(nodeType reflect.Type, nodeName string) (adapter.Node, error)

GetNode gets a node by type/name

func (*KubeGraph) GetObjects

func (kgraph *KubeGraph) GetObjects(objectType reflect.Type) (map[string]runtime.Object, error)

GetObjects gets all objects in store

func (*KubeGraph) LinkNode

func (kgraph *KubeGraph) LinkNode(node adapter.Node, targetNodeType reflect.Type, targetNodeName string) (edge adapter.Edge, err error)

LinkNode links the node to the target node type/name, if it exists

func (*KubeGraph) Transform

func (kgraph *KubeGraph) Transform(obj runtime.Object) (adapter.Node, error)

Transform creates a node on the graph for the resource

func (*KubeGraph) WriteTo added in v0.2.0

func (kgraph *KubeGraph) WriteTo(target io.Writer) (int64, error)

Write write the graph contents to a writer using simple TAB indentation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL