MCPcopy Create free account
hub / github.com/eth-easl/dirigent / CleanResources

Method CleanResources

internal/worker_node/worker_node.go:149–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147}
148
149func (w *WorkerNode) CleanResources() {
150 keys := make([]string, 0)
151 for _, key := range w.SandboxManager.Metadata.Keys() {
152 keys = append(keys, key)
153 }
154
155 for _, key := range keys {
156 _, err := w.SandboxRuntime.DeleteSandbox(context.Background(), &proto.SandboxID{
157 ID: key,
158 })
159 if err != nil {
160 logrus.Warn("Failed to clean resource (sandbox) - ", key)
161 }
162 }
163}
164
165func (w *WorkerNode) DeregisterNodeFromControlPlane(config config.WorkerNodeConfig, cpApi *proto.CpiInterfaceClient) {
166 logrus.Info("Trying to deregister the node with the control plane")

Callers 1

StopWorkerNodeMethod · 0.95

Calls 2

KeysMethod · 0.80
DeleteSandboxMethod · 0.65

Tested by

no test coverage detected