MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / Load

Function Load

pkg/alertsender/sender.go:136–143  ·  view source on GitHub ↗

Load loads an alert sender from the registry.

(config Config)

Source from the content-addressed store, hash-verified

134
135// Load loads an alert sender from the registry.
136func Load(config Config) (Sender, error) {
137 typ := config.Type
138 factory := factories[typ]
139 if factory == nil {
140 return nil, fmt.Errorf("%q alert sender not available in the factory", typ)
141 }
142 return factory(config)
143}
144
145// LoadAll loads all alert senders from the configuration inputs.
146func LoadAll(configs []Config) error {

Callers 3

TestEventlogSenderFunction · 0.92
TestSystraySenderFunction · 0.92
LoadAllFunction · 0.70

Calls

no outgoing calls

Tested by 2

TestEventlogSenderFunction · 0.74
TestSystraySenderFunction · 0.74