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

Method IsAction

pkg/controller/model/graph_client.go:149–162  ·  view source on GitHub ↗
(dag *graph.DAG, obj client.Object, action *Action)

Source from the content-addressed store, hash-verified

147}
148
149func (r *realGraphClient) IsAction(dag *graph.DAG, obj client.Object, action *Action) bool {
150 vertex := r.FindMatchedVertex(dag, obj)
151 if vertex == nil {
152 return false
153 }
154 v, _ := vertex.(*ObjectVertex)
155 if action == nil {
156 return v.Action == nil
157 }
158 if v.Action == nil {
159 return false
160 }
161 return *v.Action == *action
162}
163
164func (r *realGraphClient) DependOn(dag *graph.DAG, object client.Object, dependency ...client.Object) {
165 objectVertex := r.FindMatchedVertex(dag, object)

Callers

nothing calls this directly

Calls 1

FindMatchedVertexMethod · 0.95

Tested by

no test coverage detected