MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / append_service

Function append_service

atomic-cli/src/commands/agent/hook_log.rs:21–35  ·  view source on GitHub ↗
(root: &Path, event: &SessionLogEvent)

Source from the content-addressed store, hash-verified

19}
20
21fn append_service(root: &Path, event: &SessionLogEvent) -> Result<(), String> {
22 let service = Service::open_root(root)
23 .map_err(|error| error.to_string())?
24 .ok_or_else(|| "not an Atomic repository".to_string())?;
25 service
26 .append_hook_log(pb::AppendHookLogRequest {
27 repository: Some(service.reference.clone()),
28 meta: crate::commands::rpc::request_meta(),
29 event: Some(libatomic::daemon::services_provenance::hook_log_proto(
30 event.clone(),
31 )),
32 })
33 .map_err(|error| error.to_string())?;
34 Ok(())
35}
36
37pub fn record_result<T, E: std::fmt::Display>(
38 root: &Path,

Callers 1

appendFunction · 0.85

Calls 4

hook_log_protoFunction · 0.85
request_metaFunction · 0.70
append_hook_logMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected