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

Method syncPluginRuntimeConfig

sdk/cliproxy/service.go:171–204  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

169}
170
171func (s *Service) syncPluginRuntimeConfig(ctx context.Context) bool {
172 if s == nil {
173 sdkAuth.RegisterPluginAuthParser(nil)
174 return false
175 }
176 if ctx == nil {
177 ctx = context.Background()
178 }
179
180 s.cfgMu.RLock()
181 cfg := s.cfg
182 s.cfgMu.RUnlock()
183
184 if s.pluginHost != nil {
185 s.pluginHost.ApplyConfig(ctx, cfg)
186 }
187 if s.coreManager != nil {
188 s.coreManager.SetPluginScheduler(s.pluginHost)
189 }
190 s.registerPluginAuthParser()
191 if s.pluginHost == nil {
192 return false
193 }
194 s.pluginHost.RegisterFrontendAuthProviders()
195 if s.accessManager != nil {
196 s.accessManager.SetProviders(sdkaccess.RegisteredProviders())
197 }
198 s.pluginHost.RegisterUsagePlugins()
199 sdktranslator.SetPluginHooks(s.pluginHost)
200 if s.server != nil {
201 s.server.RefreshPluginManagementRoutes()
202 }
203 return true
204}
205
206func (s *Service) syncPluginModelRuntime(ctx context.Context) {
207 if s == nil || s.pluginHost == nil || s.coreManager == nil {

Calls 8

SetPluginSchedulerMethod · 0.80
SetProvidersMethod · 0.80
RegisterUsagePluginsMethod · 0.80
SetPluginHooksMethod · 0.80
ApplyConfigMethod · 0.45