https://github.com/deepfence/agent-plugins-grpc
Agent plugins' gRPC definitions
https://github.com/deepfence/agent-plugins-grpc
Last synced: over 1 year ago
JSON representation
Agent plugins' gRPC definitions
- Host: GitHub
- URL: https://github.com/deepfence/agent-plugins-grpc
- Owner: deepfence
- License: apache-2.0
- Created: 2021-12-28T06:21:48.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-05T09:52:35.000Z (over 1 year ago)
- Last Synced: 2025-01-17T11:34:02.682Z (over 1 year ago)
- Language: Makefile
- Size: 50.8 KB
- Stars: 23
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Agent plugins gRPC
This repository contains all the schema used by plugins to communicate with the probe agent.
## Go (ThreatMapper)
Run the Makefile located in this repository to generate all the gRPC go files:
```
make go
```
## Rust (open-tracer)
For Rust, we recommend to use `cargo` directly. Create a `build.rs` file alongside your `Cargo.toml`.
Then add the following:
```
tonic_build::configure()
.build_server(true)
.compile(
&[
"proto/common.proto",
"proto/agent_plugin.proto",
"proto/kernel_tracer.proto",
"proto/open_tracer.proto",
],
&["proto"],
)?;
Ok(())
```
In your project `Cargo.toml`:
```
tonic = "0.6"
prost = "0.9"
futures = "0.3.19"
```
In your source code, you can start using protobuf output by including it like:
```
pub mod proto {
pub mod common {
tonic::include_proto!("common");
}
pub mod kernel_tracer {
tonic::include_proto!("kernel_tracer");
}
pub mod agent_plugin {
tonic::include_proto!("agent_plugin");
}
pub mod open_tracer {
tonic::include_proto!("open_tracer");
}
}
```