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

Method SetToolsError

cache/tools_cache.go:86–104  ·  view source on GitHub ↗
(entity params.ForgeEntity, err error)

Source from the content-addressed store, hash-verified

84}
85
86func (g *GithubToolsCache) SetToolsError(entity params.ForgeEntity, err error) {
87 g.mux.Lock()
88 defer g.mux.Unlock()
89
90 // If the entity is not in the cache, add it with the error.
91 cache, ok := g.entities[entity.ID]
92 if !ok {
93 g.entities[entity.ID] = GithubEntityTools{
94 updatedAt: time.Now(),
95 entity: entity,
96 err: err,
97 }
98 return
99 }
100
101 // Update the error for the existing entity.
102 cache.err = err
103 g.entities[entity.ID] = cache
104}
105
106func (g *GithubToolsCache) Delete(entityID string) {
107 g.mux.Lock()

Callers 1

SetGithubToolsCacheErrorFunction · 0.80

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected