pub mod channel;
pub mod client;
pub mod tls;
pub use channel::create_channel;
pub use client::{GrpcClient, GrpcClientConfig};
pub use tls::{CompressionMode, ProtoConfig, TlsConfig};
use serde::Serialize;
use serde_json::Value;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, PartialEq, Eq)]
pub struct GrpcResponse {
pub headers: HashMap<String, String>,
pub trailers: HashMap<String, String>,
pub messages: Vec<Value>,
pub error: Option<String>,
}
impl Default for GrpcResponse {
fn default() -> Self {
Self::new()
}
}
impl GrpcResponse {
pub fn new() -> Self {
Self {
headers: HashMap::new(),
trailers: HashMap::new(),
messages: Vec::new(),
error: None,
}
}
}