MCPcopy Create free account
hub / github.com/cloudbase/garm / DeleteEntity

Method DeleteEntity

cache/entity_cache.go:226–239  ·  view source on GitHub ↗
(entityID string)

Source from the content-addressed store, hash-verified

224}
225
226func (e *EntityCache) DeleteEntity(entityID string) {
227 e.mux.Lock()
228 defer e.mux.Unlock()
229
230 if cache, ok := e.entities[entityID]; ok {
231 for poolID := range cache.Pools {
232 delete(e.pools, poolID)
233 }
234 for scaleSetID := range cache.ScaleSets {
235 delete(e.scalesets, scaleSetID)
236 }
237 }
238 delete(e.entities, entityID)
239}
240
241func (e *EntityCache) SetEntityPool(entityID string, pool params.Pool) {
242 e.mux.Lock()

Callers 1

DeleteEntityFunction · 0.80

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected