Create HelperProcessorRegistry

This commit is contained in:
Pragyansh Chaturvedi
2025-10-01 03:06:55 +05:30
parent 7e45864552
commit 6cd07498fe

View File

@ -0,0 +1,16 @@
class HelperHandlerRegistry:
"""Registry for BPF helpers"""
_handlers = {}
@classmethod
def register(cls, helper_name):
"""Decorator to register a handler function for a helper"""
def decorator(func):
cls._handlers[helper_name] = func
return func
return decorator
@classmethod
def get_handler(cls, helper_name):
"""Get the handler function for a helper"""
return cls._handlers.get(helper_name)