saluki_core/topology/
context.rs1use memory_accounting::MemoryLimiter;
2use saluki_health::HealthRegistry;
3use tokio::runtime::Handle;
4
5#[derive(Clone)]
7pub struct TopologyContext {
8 memory_limiter: MemoryLimiter,
9 health_registry: HealthRegistry,
10 global_thread_pool: Handle,
11}
12
13impl TopologyContext {
14 pub fn new(memory_limiter: MemoryLimiter, health_registry: HealthRegistry, global_thread_pool: Handle) -> Self {
16 Self {
17 memory_limiter,
18 health_registry,
19 global_thread_pool,
20 }
21 }
22
23 pub fn memory_limiter(&self) -> &MemoryLimiter {
25 &self.memory_limiter
26 }
27
28 pub fn health_registry(&self) -> &HealthRegistry {
30 &self.health_registry
31 }
32
33 pub fn global_thread_pool(&self) -> &Handle {
35 &self.global_thread_pool
36 }
37}