refactor: Make eBPF dependencies optional and add conditional compilation support to packet-gateway

- Add ebpf feature flag to Cargo.toml with default disabled
- Make aya and aya-log dependencies optional and tied to ebpf feature
- Add #[cfg(feature = "ebpf")] conditional compilation directives for EbpfManager imports and usage
- Add feature-gated readiness check logic (ebpf_ok only checked when feature enabled)
- Add feature-gated metrics_handler implementations (full version with eBPF, stub version without)
- Change
This commit is contained in:
nutcas3
2026-04-26 02:00:27 +03:00
parent 95def1bcab
commit 1d489a0a8a
3 changed files with 29 additions and 5 deletions
+6 -2
View File
@@ -6,9 +6,13 @@ edition.workspace = true
rust-version.workspace = true
license.workspace = true
[features]
default = []
ebpf = []
[dependencies]
aya = { workspace = true }
aya-log = { workspace = true }
aya = { version = "0.13.1", features = ["async_tokio"], optional = true }
aya-log = { version = "0.2.1", optional = true }
tokio = { workspace = true }
redis = { workspace = true }
anyhow = { workspace = true }