RegisterBuiltinPlugin registers a builtin plugin. It is stored in a separate map so that Reload() can re-inject it when no external override exists.
(plugin Plugin)
| 217 | // RegisterBuiltinPlugin registers a builtin plugin. It is stored in a separate |
| 218 | // map so that Reload() can re-inject it when no external override exists. |
| 219 | func (m *Manager) RegisterBuiltinPlugin(plugin Plugin) { |
| 220 | m.mu.Lock() |
| 221 | defer m.mu.Unlock() |
| 222 | m.builtins[plugin.Name()] = plugin |
| 223 | // Only inject if no external plugin already loaded with the same name |
| 224 | if _, exists := m.plugins[plugin.Name()]; !exists { |
| 225 | m.plugins[plugin.Name()] = plugin |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | // RegisterRemotePlugin registers a remote plugin in the manager without saving to disk. |
| 230 | // This allows remote plugins to be discoverable via GetPlugin/GetPlugins. |