MCPcopy Index your code
hub / github.com/cortexproject/cortex / buildIntegrationsMap

Function buildIntegrationsMap

pkg/alertmanager/alertmanager.go:509–519  ·  view source on GitHub ↗

buildIntegrationsMap builds a map of name to the list of integration notifiers off of a list of receiver config.

(nc []config.Receiver, tmpl *template.Template, firewallDialer *util_net.FirewallDialer, logger log.Logger, notifierWrapper func(string, notify.Notifier) notify.Notifier)

Source from the content-addressed store, hash-verified

507// buildIntegrationsMap builds a map of name to the list of integration notifiers off of a
508// list of receiver config.
509func buildIntegrationsMap(nc []config.Receiver, tmpl *template.Template, firewallDialer *util_net.FirewallDialer, logger log.Logger, notifierWrapper func(string, notify.Notifier) notify.Notifier) (map[string][]notify.Integration, error) {
510 integrationsMap := make(map[string][]notify.Integration, len(nc))
511 for _, rcv := range nc {
512 integrations, err := buildReceiverIntegrations(rcv, tmpl, firewallDialer, logger, notifierWrapper)
513 if err != nil {
514 return nil, err
515 }
516 integrationsMap[rcv.Name] = integrations
517 }
518 return integrationsMap, nil
519}
520
521// buildReceiverIntegrations builds a list of integration notifiers off of a
522// receiver config.

Callers 1

ApplyConfigMethod · 0.85

Calls 1

Tested by

no test coverage detected