MCPcopy Index your code
hub / github.com/devspace-sh/devspace / register

Method register

pkg/util/interrupt/interrupt.go:83–91  ·  view source on GitHub ↗
(id string, fn func())

Source from the content-addressed store, hash-verified

81}
82
83func (h *Handler) register(id string, fn func()) {
84 h.notifyMutex.Lock()
85 defer h.notifyMutex.Unlock()
86
87 h.notify = append(h.notify, notify{
88 id: id,
89 fn: fn,
90 })
91}
92
93func (h *Handler) unregister(id string) {
94 h.notifyMutex.Lock()

Callers 2

RunMethod · 0.95
RunAlwaysMethod · 0.95

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected