Skip to main content

folk_plugin_grpc/
config.rs

1use std::net::SocketAddr;
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
6#[serde(default)]
7pub struct GrpcConfig {
8    pub listen: SocketAddr,
9    /// Proto files for gRPC reflection. Imports are resolved automatically.
10    /// When empty, reflection is disabled.
11    #[serde(default)]
12    pub proto: Vec<String>,
13}
14
15impl Default for GrpcConfig {
16    fn default() -> Self {
17        Self {
18            listen: "0.0.0.0:50051".parse().unwrap(),
19            proto: vec![],
20        }
21    }
22}