MCPcopy Index your code
hub / github.com/zalando/skipper / loadFilterPlugin

Function loadFilterPlugin

plugins.go:227–243  ·  view source on GitHub ↗
(path string, args []string)

Source from the content-addressed store, hash-verified

225}
226
227func loadFilterPlugin(path string, args []string) (filters.Spec, error) {
228 mod, err := plugin.Open(path)
229 if err != nil {
230 return nil, fmt.Errorf("open filter plugin %s: %s", path, err)
231 }
232
233 conf, err := readPluginConfig(path)
234 if err != nil {
235 return nil, fmt.Errorf("failed to read config for %s: %s", path, err)
236 }
237
238 sym, err := mod.Lookup("InitFilter")
239 if err != nil {
240 return nil, fmt.Errorf("lookup module symbol failed for %s: %s", path, err)
241 }
242 return initFilterPlugin(sym, path, append(conf, args...))
243}
244
245func initFilterPlugin(sym plugin.Symbol, path string, args []string) (filters.Spec, error) {
246 fn, ok := sym.(func([]string) (filters.Spec, error))

Callers 1

loadFilterPluginsMethod · 0.85

Calls 4

readPluginConfigFunction · 0.85
initFilterPluginFunction · 0.85
ErrorfMethod · 0.65
LookupMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…