Skip to main content
Glama
app_state.rs762 B
use std::sync::Arc; use dal::DalContextBuilder; use si_data_nats::NatsClient; use crate::server::ServerMetadata; /// Application state. #[derive(Clone, Debug)] pub struct AppState { pub metadata: Arc<ServerMetadata>, pub concurrency_limit: usize, /// NATS client pub(crate) nats: NatsClient, /// DAL context builder for each processing request pub ctx_builder: DalContextBuilder, } impl AppState { /// Creates a new [`AppState`]. pub fn new( metadata: Arc<ServerMetadata>, concurrency_limit: usize, nats: NatsClient, ctx_builder: DalContextBuilder, ) -> Self { Self { metadata, concurrency_limit, nats, ctx_builder, } } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server