(pluginPath string, metadata *Metadata)
| 131 | } |
| 132 | |
| 133 | func (pm *prototypePluginManager) CreatePlugin(pluginPath string, metadata *Metadata) (Plugin, error) { |
| 134 | rt, ok := pm.runtimes[metadata.Runtime] |
| 135 | if !ok { |
| 136 | return nil, fmt.Errorf("unsupported plugin runtime type: %q", metadata.Runtime) |
| 137 | } |
| 138 | |
| 139 | return rt.CreatePlugin(pluginPath, metadata) |
| 140 | } |
| 141 | |
| 142 | // LoadDir loads a plugin from the given directory. |
| 143 | func LoadDir(dirname string) (Plugin, error) { |
nothing calls this directly
no test coverage detected