(sym plugin.Symbol, path string, args []string)
| 195 | } |
| 196 | |
| 197 | func 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 | |
| 209 | func (o *Options) loadFilterPlugins(found map[string]string, done map[string][]string) error { |
| 210 | for _, fltr := range o.FilterPlugins { |
no test coverage detected
searching dependent graphs…