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