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

Method Start

coderd/healthcheck/healthcheck.go:35–45  ·  view source on GitHub ↗

Start records that a check has started.

(name string)

Source from the content-addressed store, hash-verified

33
34// Start records that a check has started.
35func (p *Progress) Start(name string) {
36 p.mu.Lock()
37 defer p.mu.Unlock()
38 if p.Clock == nil {
39 p.Clock = quartz.NewReal()
40 }
41 if p.checks == nil {
42 p.checks = make(map[string]*checkStatus)
43 }
44 p.checks[name] = &checkStatus{startedAt: p.Clock.Now()}
45}
46
47// Complete records that a check has finished.
48func (p *Progress) Complete(name string) {

Callers 1

TestCheckProgressFunction · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1

TestCheckProgressFunction · 0.76