Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(adapter ResourceAdapter)
Register sets up a given resource type adapter
Types ¶
type ResourceAdapter ¶
type ResourceAdapter interface { // GetType returns the reflected type of the k8s kind managed by this instance GetType() reflect.Type // Create add a graph node for the given object and stores it for further actions Create(sgraph StatefulGraph, obj runtime.Object) (Node, error) // Connect creates and edge between the given node and an object on this adapter Connect(sgraph StatefulGraph, source Node, targetName string) (Edge, error) // Configure connects the resources on this adapter with its dependencies Configure(sgraph StatefulGraph) error }
ResourceAdapter instructions on how to deal with a given kubernetes kind
type ResourceData ¶
ResourceData data used by kubernetes resource adapters
type StatefulGraph ¶
type StatefulGraph interface { io.WriterTo // AddStyledNode creates a new styled node with the given resource AddStyledNode(resourceType reflect.Type, resourceObject runtime.Object, nodeName string, resourceName string, icon string) (Node, error) // LinkNode links the node to the target node type/name, if it exists LinkNode(node Node, targetNodeType reflect.Type, targetNodeName string) (Edge, error) // GetObjects gets all objects in store GetObjects(objectType reflect.Type) (map[string]runtime.Object, error) // GetNode gets a node by type/name GetNode(nodeType reflect.Type, nodeName string) (Node, error) }
StatefulGraph graphviz-compatible struct with runtime object and node storage
Click to show internal directories.
Click to hide internal directories.