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

Method Init

agent/agentcontainers/api.go:385–396  ·  view source on GitHub ↗

Init applies a final set of options to the API and marks initialization as done. This method can only be called once.

(opts ...Option)

Source from the content-addressed store, hash-verified

383// Init applies a final set of options to the API and marks
384// initialization as done. This method can only be called once.
385func (api *API) Init(opts ...Option) {
386 api.mu.Lock()
387 defer api.mu.Unlock()
388 if api.closed || api.initDone {
389 return
390 }
391 api.initDone = true
392
393 for _, opt := range opts {
394 opt(api)
395 }
396}
397
398// Start starts the API by initializing the watcher and updater loops.
399// This method calls Init, if it is desired to apply options after

Callers 1

StartMethod · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected