MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / build

Method build

crates/openshell-ocsf/src/builders/lifecycle.rs:34–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32
33 #[must_use]
34 pub fn build(self) -> OcsfEvent {
35 let activity_name = self.activity.lifecycle_label().to_string();
36 let mut base = BaseEventData::new(
37 6002,
38 "Application Lifecycle",
39 6,
40 "Application Activity",
41 self.activity.as_u8(),
42 &activity_name,
43 self.severity,
44 self.ctx.metadata(&["container", "host"]),
45 );
46 self.ctx
47 .apply_common_fields(&mut base, self.status, self.message);
48
49 OcsfEvent::ApplicationLifecycle(ApplicationLifecycleEvent {
50 base,
51 app: Product::openshell_sandbox(&self.ctx.product_version),
52 })
53 }
54}
55
56impl_activity_setter!(AppLifecycleBuilder);

Callers 1

Calls 4

lifecycle_labelMethod · 0.80
metadataMethod · 0.80
apply_common_fieldsMethod · 0.80
as_u8Method · 0.45

Tested by 1