MCPcopy Index your code
hub / github.com/coder/coder / complete

Method complete

agent/checkpoint.go:23–35  ·  view source on GitHub ↗

complete the checkpoint. Pass nil to indicate the checkpoint was ok. It is an error to call this more than once.

(err error)

Source from the content-addressed store, hash-verified

21// complete the checkpoint. Pass nil to indicate the checkpoint was ok. It is an error to call this
22// more than once.
23func (c *checkpoint) complete(err error) {
24 c.mu.Lock()
25 defer c.mu.Unlock()
26 if c.called {
27 b := make([]byte, 2048)
28 n := runtime.Stack(b, false)
29 c.logger.Critical(context.Background(), "checkpoint complete called more than once", slog.F("stacktrace", b[:n]))
30 return
31 }
32 c.called = true
33 c.err = err
34 close(c.done)
35}
36
37func (c *checkpoint) wait(ctx context.Context) error {
38 select {

Callers 5

handleManifestMethod · 0.80
createOrUpdateNetworkMethod · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 3