MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / run

Function run

chirpstack/src/cmd/root.rs:10–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8use crate::{adr, api, applayer::fuota, backend, downlink, integration, region, storage};
9
10pub async fn run() -> Result<()> {
11 info!(
12 version = env!("CARGO_PKG_VERSION"),
13 docs = "https://www.chirpstack.io/",
14 "Starting ChirpStack LoRaWAN Network Server"
15 );
16
17 storage::setup().await?;
18 region::setup()?;
19 backend::setup().await?;
20 adr::setup().await?;
21 integration::setup().await?;
22 gateway::backend::setup().await?;
23 downlink::setup().await;
24 fuota::setup().await;
25 api::setup().await?;
26
27 let mut signals = Signals::new([SIGINT, SIGTERM]).unwrap();
28 if let Some(signal) = signals.next().await {
29 warn!(signal = ?signal, "Signal received, terminating process");
30 }
31
32 Ok(())
33}

Callers 1

mainFunction · 0.50

Calls 2

unwrapMethod · 0.80
setupFunction · 0.50

Tested by

no test coverage detected