MCPcopy Create free account
hub / github.com/cargo-lambda/cargo-lambda / main

Function main

tests/templates/extension-template/src/main.rs:60–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58
59#[tokio::main]
60async fn main() -> Result<(), Error> {
61 tracing::init_default_subscriber();
62
63 {% if logs -%}
64 let logs_processor = SharedService::new(service_fn(logs_extension));
65 {% endif -%}
66 {% if telemetry -%}
67 let telemetry_processor = SharedService::new(service_fn(telemetry_extension));
68 {% endif %}
69 Extension::new()
70 {%- if use_events %}
71 .with_events_processor(service_fn(events_extension))
72 {%- endif -%}
73 {%- if logs %}
74 .with_logs_processor(logs_processor)
75 {%- endif -%}
76 {%- if telemetry %}
77 .with_telemetry_processor(telemetry_processor)
78 {%- endif %}
79 .run()
80 .await
81}

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected