MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / removePluginRuntimeStateLocked

Method removePluginRuntimeStateLocked

internal/pluginhost/host.go:552–574  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

550}
551
552func (h *Host) removePluginRuntimeStateLocked(id string) {
553 for key, record := range h.managementRoutes {
554 if record.pluginID == id {
555 delete(h.managementRoutes, key)
556 }
557 }
558 for key, record := range h.resourceRoutes {
559 if record.pluginID == id {
560 delete(h.resourceRoutes, key)
561 }
562 }
563 for name, record := range h.commandLineFlags {
564 if record.pluginID == id {
565 delete(h.commandLineFlags, name)
566 delete(h.commandLineHits, name)
567 }
568 }
569 if registration, ok := h.modelRegistrations[id]; ok {
570 delete(h.providerModels, registration.provider)
571 }
572 delete(h.modelProviders, id)
573 delete(h.modelRegistrations, id)
574}
575
576func (h *Host) rebuildActivePluginMapsLocked(records []capabilityRecord) {
577 h.pluginFileVersions = make(map[string]string, len(records))

Callers 2

ApplyConfigMethod · 0.95
UnloadPluginMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected