1 parent 7e45864 commit 6cd0749Copy full SHA for 6cd0749
1 file changed
pythonbpf/helper/helper_utils.py
@@ -0,0 +1,16 @@
1
+class HelperHandlerRegistry:
2
+ """Registry for BPF helpers"""
3
+ _handlers = {}
4
+
5
+ @classmethod
6
+ def register(cls, helper_name):
7
+ """Decorator to register a handler function for a helper"""
8
+ def decorator(func):
9
+ cls._handlers[helper_name] = func
10
+ return func
11
+ return decorator
12
13
14
+ def get_handler(cls, helper_name):
15
+ """Get the handler function for a helper"""
16
+ return cls._handlers.get(helper_name)
0 commit comments