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

Function initPredicatePlugin

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

Source from the content-addressed store, hash-verified

290}
291
292func initPredicatePlugin(sym plugin.Symbol, path string, args []string) (routing.PredicateSpec, error) {
293 fn, ok := sym.(func([]string) (routing.PredicateSpec, error))
294 if !ok {
295 return nil, fmt.Errorf("plugin %s's InitPredicate function has wrong signature", path)
296 }
297 spec, err := fn(args)
298 if err != nil {
299 return nil, fmt.Errorf("plugin %s returned: %s", path, err)
300 }
301 return spec, nil
302}
303
304func (o *Options) loadDataClientPlugins(found map[string]string, done map[string][]string) error {
305 for _, pred := range o.DataClientPlugins {

Callers 2

findAndLoadPluginsMethod · 0.85
loadPredicatePluginFunction · 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…