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

Method WithHandlers

coderd/notifications/manager.go:134–136  ·  view source on GitHub ↗

WithHandlers allows for tests to inject their own handlers to verify functionality.

(reg map[database.NotificationMethod]Handler)

Source from the content-addressed store, hash-verified

132
133// WithHandlers allows for tests to inject their own handlers to verify functionality.
134func (m *Manager) WithHandlers(reg map[database.NotificationMethod]Handler) {
135 m.handlers = reg
136}
137
138var ErrManagerAlreadyClosed = xerrors.New("manager already closed")
139

Callers 11

TestMetricsFunction · 0.95
TestPendingUpdatesMetricFunction · 0.95
TestSMTPDispatchFunction · 0.95
TestBackpressureFunction · 0.95
TestRetriesFunction · 0.95
TestNotifierPausedFunction · 0.95
TestBufferedUpdatesFunction · 0.95

Calls

no outgoing calls

Tested by 11

TestMetricsFunction · 0.76
TestPendingUpdatesMetricFunction · 0.76
TestSMTPDispatchFunction · 0.76
TestBackpressureFunction · 0.76
TestRetriesFunction · 0.76
TestNotifierPausedFunction · 0.76
TestBufferedUpdatesFunction · 0.76