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

Method dispatch

sdk/cliproxy/usage/manager.go:288–302  ·  view source on GitHub ↗
(item queueItem)

Source from the content-addressed store, hash-verified

286}
287
288func (m *Manager) dispatch(item queueItem) {
289 m.pluginsMu.RLock()
290 plugins := make([]Plugin, len(m.plugins))
291 copy(plugins, m.plugins)
292 m.pluginsMu.RUnlock()
293 if len(plugins) == 0 {
294 return
295 }
296 for _, plugin := range plugins {
297 if plugin == nil {
298 continue
299 }
300 safeInvoke(plugin, item.ctx, item.record)
301 }
302}
303
304func safeInvoke(plugin Plugin, ctx context.Context, record Record) {
305 defer func() {

Callers 1

runMethod · 0.95

Calls 1

safeInvokeFunction · 0.85

Tested by

no test coverage detected