pub fn new<B, S, M>(
        logger_factory: &LoggerFactory,
        stores: HashMap<String, Arc<S>>,
        eth_adapters: HashMap<String, Arc<dyn EthereumAdapter>>,
        host_builder: impl RuntimeHostBuilder,
        block_stream_builder: B,
        metrics_registry: Arc<M>,
    ) -> Self
    where
        S: Store + ChainStore + SubgraphDeploymentStore + EthereumCallCache,
        B: BlockStreamBuilder,
        M: MetricsRegistry,
    {
        let logger = logger_factory.component_logger("SubgraphInstanceManager", None);
        let logger_factory = logger_factory.with_parent(logger.clone());

        // Create channel for receiving subgraph provider events.
        let (subgraph_sender, subgraph_receiver) = channel(100);

        // Handle incoming events from the subgraph provider.
        Self::handle_subgraph_events(
            logger_factory,
            subgraph_receiver,
            stores,
            eth_adapters,
            host_builder,
            block_stream_builder,
            metrics_registry.clone(),
        );

        SubgraphInstanceManager {
            logger,
            input: subgraph_sender,
        }
    }
/// Creates a new runtime manager.
Creates a new runtime manager.
Creates a new runtime manager .
pub fn new<B, S, M>(
        logger_factory: &LoggerFactory,
        stores: HashMap<String, Arc<S>>,
        eth_adapters: HashMap<String, Arc<dyn EthereumAdapter>>,
        host_builder: impl RuntimeHostBuilder,
        block_stream_builder: B,
        metrics_registry: Arc<M>,
    ) -> Self
    where
        S: Store + ChainStore + SubgraphDeploymentStore + EthereumCallCache,
        B: BlockStreamBuilder,
        M: MetricsRegistry,
    {
        let logger = logger_factory.component_logger("SubgraphInstanceManager", None);
        let logger_factory = logger_factory.with_parent(logger.clone());
        // Create channel for receiving subgraph provider events.
        let (subgraph_sender, subgraph_receiver) = channel(100);
        // Handle incoming events from the subgraph provider.
        Self::handle_subgraph_events(
            logger_factory,
            subgraph_receiver,
            stores,
            eth_adapters,
            host_builder,
            block_stream_builder,
            metrics_registry.clone(),
        );
        SubgraphInstanceManager {
            logger,
            input: subgraph_sender,
        }
    }
pub fn new < B , S , M > ( logger_factory : & LoggerFactory , stores : HashMap < String , Arc < S > > , eth_adapters : HashMap < String , Arc < dyn EthereumAdapter > > , host_builder : impl RuntimeHostBuilder , block_stream_builder : B , metrics_registry : Arc < M > , ) -> Self where S : Store + ChainStore + SubgraphDeploymentStore + EthereumCallCache , B : BlockStreamBuilder , M : MetricsRegistry , { let logger = logger_factory . component_logger ( " " , None ) ; let logger_factory = logger_factory . with_parent ( logger . clone ( ) ) ; // Create channel for receiving subgraph provider events. let ( subgraph_sender , subgraph_receiver ) = channel ( 100 ) ; // Handle incoming events from the subgraph provider. Self :: handle_subgraph_events ( logger_factory , subgraph_receiver , stores , eth_adapters , host_builder , block_stream_builder , metrics_registry . clone ( ) , ) ; SubgraphInstanceManager { logger , input : subgraph_sender , } }
Creates a new runtime manager.
Creates a new runtime manager .
logger_factory
&LoggerFactory
stores
HashMap<String, Arc<S>>
eth_adapters
HashMap<String, Arc<dyn EthereumAdapter>>
host_builder
impl RuntimeHostBuilder
block_stream_builder
B
metrics_registry
Arc<M>
logger_factory
&LoggerFactory
stores
HashMap<String, Arc<S>>
eth_adapters
HashMap<String, Arc<dyn EthereumAdapter>>
host_builder
impl RuntimeHostBuilder
block_stream_builder
B
metrics_registry
Arc<M>