use arbor_graph::ArborGraph;
use std::sync::Arc;
use tokio::sync::RwLock;
pub type SharedGraph = Arc<RwLock<ArborGraph>>;
#[derive(Debug, Clone, serde::Serialize)]
#[serde(tag = "type")]
pub enum ServerMessage {
GraphUpdate,
FocusNode,
IndexerStatus,
}
mod handlers;
mod protocol;
mod server;
pub mod sync_server;
pub use protocol::{Request, Response, RpcError};
pub use server::{ArborServer, ServerConfig};
pub use sync_server::{
BroadcastMessage, FocusNodePayload, GraphUpdatePayload, IndexerStatusPayload, SyncServer,
SyncServerConfig, SyncServerHandle,
};