MCPcopy Create free account
hub / github.com/foxcpp/maddy / DeliveryDirective

Function DeliveryDirective

framework/config/module/interfaces.go:45–47  ·  view source on GitHub ↗

DeliveryDirective is a callback for use in config.Map.Custom. It does all work necessary to create a module instance from the config directive with the following structure: directive_name mod_name [inst_name] [{ inline_mod_config }] Note that if used configuration structure lacks directive_n

(m *config.Map, node config.Node)

Source from the content-addressed store, hash-verified

43// Note that if used configuration structure lacks directive_name before mod_name - this function
44// should not be used (call DeliveryTarget directly).
45func DeliveryDirective(m *config.Map, node config.Node) (interface{}, error) {
46 return DeliveryTarget(m.Globals, node.Args, node)
47}
48
49func DeliveryTarget(globals map[string]interface{}, args []string, block config.Node) (module.DeliveryTarget, error) {
50 var target module.DeliveryTarget

Callers

nothing calls this directly

Calls 1

DeliveryTargetFunction · 0.70

Tested by

no test coverage detected