MCPcopy
hub / github.com/apecloud/kubeblocks / FindRootVertex

Function FindRootVertex

pkg/controller/model/transform_utils.go:37–44  ·  view source on GitHub ↗
(dag *graph.DAG)

Source from the content-addressed store, hash-verified

35)
36
37func FindRootVertex(dag *graph.DAG) (*ObjectVertex, error) {
38 root := dag.Root()
39 if root == nil {
40 return nil, fmt.Errorf("root vertex not found: %v", dag)
41 }
42 rootVertex, _ := root.(*ObjectVertex)
43 return rootVertex, nil
44}
45
46func GetGVKName(object client.Object) (*GVKNObjKey, error) {
47 gvk, err := apiutil.GVKForObject(object, scheme)

Calls 1

RootMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…