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

Function initDataClientPlugin

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

Source from the content-addressed store, hash-verified

338}
339
340func initDataClientPlugin(sym plugin.Symbol, path string, args []string) (routing.DataClient, error) {
341 fn, ok := sym.(func([]string) (routing.DataClient, error))
342 if !ok {
343 return nil, fmt.Errorf("plugin %s's InitDataClient function has wrong signature", path)
344 }
345 spec, err := fn(args)
346 if err != nil {
347 return nil, fmt.Errorf("module %s returned: %s", path, err)
348 }
349 return spec, nil
350}
351
352func readPluginConfig(plugin string) (conf []string, err error) {
353 data, err := os.ReadFile(plugin[:len(plugin)-3] + ".conf")

Callers 2

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