#[cfg(feature = "grpc")]
use crate::config::GrpcConfig;
use crate::error::RuntimeError;
#[cfg(feature = "grpc")]
pub struct GrpcServer {
config: GrpcConfig,
}
#[cfg(feature = "grpc")]
impl GrpcServer {
pub fn new(config: GrpcConfig) -> Self {
Self { config }
}
pub async fn start(self) -> Result<(), RuntimeError> {
tracing::info!(addr = %self.config.bind, "gRPC server not yet implemented");
Ok(())
}
}
#[cfg(not(feature = "grpc"))]
pub struct GrpcServer;
#[cfg(not(feature = "grpc"))]
impl GrpcServer {
pub fn new(_config: ()) -> Self {
Self
}
pub async fn start(self) -> Result<(), RuntimeError> {
Ok(())
}
}