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

Method Start

workers/cache/tool_cache.go:71–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69}
70
71func (t *toolsUpdater) Start() error {
72 t.mux.Lock()
73 defer t.mux.Unlock()
74
75 if t.running {
76 return nil
77 }
78
79 t.running = true
80 t.quit = make(chan struct{})
81
82 slog.DebugContext(t.ctx, "starting tools updater", "entity", t.entity.String(), "forge_type", t.entity.Credentials.ForgeType)
83
84 switch t.entity.Credentials.ForgeType {
85 case params.GithubEndpointType:
86 go t.loop()
87 case params.GiteaEndpointType:
88 go t.giteaUpdateLoop()
89 }
90 return nil
91}
92
93func (t *toolsUpdater) Stop() error {
94 t.mux.Lock()

Callers

nothing calls this directly

Calls 5

loopMethod · 0.95
giteaUpdateLoopMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected