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

Method SetInstance

cache/instance_cache.go:37–42  ·  view source on GitHub ↗
(instance params.Instance)

Source from the content-addressed store, hash-verified

35}
36
37func (i *InstanceCache) SetInstance(instance params.Instance) {
38 i.mux.Lock()
39 defer i.mux.Unlock()
40
41 i.cache[instance.Name] = instance
42}
43
44func (i *InstanceCache) GetInstance(name string) (params.Instance, bool) {
45 i.mux.Lock()

Callers 1

SetInstanceCacheFunction · 0.45

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected