MCPcopy
hub / github.com/mitmproxy/mitmproxy / invoke_addon

Method invoke_addon

mitmproxy/addonmanager.py:264–272  ·  view source on GitHub ↗

Asynchronously invoke an event on an addon and all its children.

(self, addon, event: hooks.Hook)

Source from the content-addressed store, hash-verified

262 )
263
264 async def invoke_addon(self, addon, event: hooks.Hook):
265 """
266 Asynchronously invoke an event on an addon and all its children.
267 """
268 for addon, func in self._iter_hooks(addon, event):
269 res = func(*event.args())
270 # Support both async and sync hook functions
271 if res is not None and inspect.isawaitable(res):
272 await res
273
274 def invoke_addon_sync(self, addon, event: hooks.Hook):
275 """

Callers 2

trigger_eventMethod · 0.95
cycleMethod · 0.80

Calls 2

_iter_hooksMethod · 0.95
argsMethod · 0.80

Tested by

no test coverage detected