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

Method SetEntityRunnerGroup

cache/entity_cache.go:460–470  ·  view source on GitHub ↗
(entityID, runnerGroupName string, runnerGroupID int64)

Source from the content-addressed store, hash-verified

458}
459
460func (e *EntityCache) SetEntityRunnerGroup(entityID, runnerGroupName string, runnerGroupID int64) {
461 e.mux.Lock()
462 defer e.mux.Unlock()
463
464 if _, ok := e.entities[entityID]; ok {
465 e.entities[entityID].RunnerGroups[runnerGroupName] = RunnerGroupEntry{
466 RunnerGroupID: runnerGroupID,
467 time: time.Now().UTC(),
468 }
469 }
470}
471
472func (e *EntityCache) GetEntityRunnerGroup(entityID, runnerGroupName string) (int64, bool) {
473 e.mux.Lock()

Callers 1

SetEntityRunnerGroupFunction · 0.80

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected