MCPcopy Create free account
hub / github.com/coder/coder / Complete

Method Complete

coderd/healthcheck/healthcheck.go:48–61  ·  view source on GitHub ↗

Complete records that a check has finished.

(name string)

Source from the content-addressed store, hash-verified

46
47// Complete records that a check has finished.
48func (p *Progress) Complete(name string) {
49 p.mu.Lock()
50 defer p.mu.Unlock()
51 if p.Clock == nil {
52 p.Clock = quartz.NewReal()
53 }
54 if p.checks == nil {
55 p.checks = make(map[string]*checkStatus)
56 }
57 if p.checks[name] == nil {
58 p.checks[name] = &checkStatus{startedAt: p.Clock.Now()}
59 }
60 p.checks[name].completedAt = p.Clock.Now()
61}
62
63// Reset clears all recorded check statuses.
64func (p *Progress) Reset() {

Callers 2

TestCheckProgressFunction · 0.95
RunFunction · 0.45

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1

TestCheckProgressFunction · 0.76