Initial design for attach arguments of custom attach implementations:
Store string-represented attach argument in perf_event, and add related API to create such perf event. This will keep the compatibility with the current attaching framework
Design for the example
The example should be a nginx plugin, providing functions to filter nginx requests. Filtering will be carried out through calling a eBPF program.
There will be two parts of the example:
One part is a nginx plugin, which depends on runtime and base_attach_impl. It will register an attach implementation named nginx_request_filter_attach_impl at runtime, uses the normal way to instantiate handlers from bpf_attach_ctx
Another part is a configurator, which can control things stored in shared memory through bpftime runtime.
Since now we don't have packed static library for bpftime, this example will be under the cmake project of bpftime. Once we could pack single-file static library and corresponding headers, we could move the example to a new repository
Closes #246
Closes #235
Initial design for attach arguments of custom attach implementations:
Design for the example
The example should be a nginx plugin, providing functions to filter nginx requests. Filtering will be carried out through calling a eBPF program.
There will be two parts of the example:
One part is a nginx plugin, which depends on runtime and base_attach_impl. It will register an attach implementation named
nginx_request_filter_attach_impl
at runtime, uses the normal way to instantiate handlers from bpf_attach_ctxSince now we don't have packed static library for bpftime, this example will be under the cmake project of bpftime. Once we could pack single-file static library and corresponding headers, we could move the example to a new repository
Detailed documents could be found at https://github.com/Officeyutong/bpftime/blob/master/example/attach_implementation/README.md