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

Function initPlugin

plugins.go:197–207  ·  view source on GitHub ↗
(sym plugin.Symbol, path string, args []string)

Source from the content-addressed store, hash-verified

195}
196
197func initPlugin(sym plugin.Symbol, path string, args []string) ([]filters.Spec, []routing.PredicateSpec, []routing.DataClient, error) {
198 fn, ok := sym.(func([]string) ([]filters.Spec, []routing.PredicateSpec, []routing.DataClient, error))
199 if !ok {
200 return nil, nil, nil, fmt.Errorf("plugin %s's InitPlugin function has wrong signature", path)
201 }
202 fltrs, preds, dcs, err := fn(args)
203 if err != nil {
204 return nil, nil, nil, fmt.Errorf("plugin %s returned: %s", path, err)
205 }
206 return fltrs, preds, dcs, nil
207}
208
209func (o *Options) loadFilterPlugins(found map[string]string, done map[string][]string) error {
210 for _, fltr := range o.FilterPlugins {

Callers 2

findAndLoadPluginsMethod · 0.85
loadPluginFunction · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…