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

Function loadDataClientPlugin

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

Source from the content-addressed store, hash-verified

320}
321
322func loadDataClientPlugin(path string, args []string) (routing.DataClient, error) {
323 mod, err := plugin.Open(path)
324 if err != nil {
325 return nil, fmt.Errorf("open data client module %s: %s", path, err)
326 }
327
328 conf, err := readPluginConfig(path)
329 if err != nil {
330 return nil, fmt.Errorf("failed to read config for %s: %s", path, err)
331 }
332
333 sym, err := mod.Lookup("InitDataClient")
334 if err != nil {
335 return nil, fmt.Errorf("lookup module symbol failed for %s: %s", path, err)
336 }
337 return initDataClientPlugin(sym, path, append(conf, args...))
338}
339
340func initDataClientPlugin(sym plugin.Symbol, path string, args []string) (routing.DataClient, error) {
341 fn, ok := sym.(func([]string) (routing.DataClient, error))

Callers 1

loadDataClientPluginsMethod · 0.85

Calls 4

readPluginConfigFunction · 0.85
initDataClientPluginFunction · 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…