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

Method newSuccessfulDispatch

coderd/notifications/notifier.go:324–332  ·  view source on GitHub ↗
(msg database.AcquireNotificationMessagesRow)

Source from the content-addressed store, hash-verified

322}
323
324func (n *notifier) newSuccessfulDispatch(msg database.AcquireNotificationMessagesRow) dispatchResult {
325 n.metrics.DispatchAttempts.WithLabelValues(string(msg.Method), msg.TemplateID.String(), ResultSuccess).Inc()
326
327 return dispatchResult{
328 notifier: n.id,
329 msg: msg.ID,
330 ts: dbtime.Time(n.clock.Now().UTC()),
331 }
332}
333
334// revive:disable-next-line:flag-parameter // Not used for control flow, rather just choosing which metric to increment.
335func (n *notifier) newFailedDispatch(msg database.AcquireNotificationMessagesRow, err error, retryable bool) dispatchResult {

Callers 1

deliverMethod · 0.95

Calls 3

TimeFunction · 0.92
WithLabelValuesMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected