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

Method GetInstance

cache/instance_cache.go:44–52  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

42}
43
44func (i *InstanceCache) GetInstance(name string) (params.Instance, bool) {
45 i.mux.Lock()
46 defer i.mux.Unlock()
47
48 if instance, ok := i.cache[name]; ok {
49 return instance, true
50 }
51 return params.Instance{}, false
52}
53
54func (i *InstanceCache) DeleteInstance(name string) {
55 i.mux.Lock()

Callers 1

GetEntityForInstanceMethod · 0.95

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected