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

Method Set

cache/tools_cache.go:68–84  ·  view source on GitHub ↗
(entity params.ForgeEntity, tools []commonParams.RunnerApplicationDownload)

Source from the content-addressed store, hash-verified

66}
67
68func (g *GithubToolsCache) Set(entity params.ForgeEntity, tools []commonParams.RunnerApplicationDownload) {
69 g.mux.Lock()
70 defer g.mux.Unlock()
71
72 forgeTools := GithubEntityTools{
73 updatedAt: time.Now(),
74 entity: entity,
75 tools: tools,
76 err: nil,
77 }
78
79 if entity.Credentials.ForgeType == params.GithubEndpointType {
80 forgeTools.expiresAt = time.Now().Add(1 * time.Hour)
81 }
82
83 g.entities[entity.ID] = forgeTools
84}
85
86func (g *GithubToolsCache) SetToolsError(entity params.ForgeEntity, err error) {
87 g.mux.Lock()

Callers 15

SetGithubToolsCacheFunction · 0.45
CollectScaleSetMetricFunction · 0.45
CollectProviderMetricFunction · 0.45
CollectRepositoryMetricFunction · 0.45
CollectJobMetricFunction · 0.45
CollectPoolMetricFunction · 0.45
CollectHealthMetricFunction · 0.45
CollectInstanceMetricFunction · 0.45
CollectEnterpriseMetricFunction · 0.45
rateLimitLoopMethod · 0.45

Calls 3

AddMethod · 0.80
LockMethod · 0.65
UnlockMethod · 0.65

Tested by 1