git_policy_cli/service/mod.rs
1//! What:
2//! The resident commit service:
3//! protocol,
4//! server,
5//! client,
6//! journal,
7//! provisioning and logging.
8//! Why:
9//! The service is a second program with its own life.
10//!
11//! In TS you'd write (pseudocode):
12//! ```ts
13//! // service/index.ts: one `export * from './file'` per module below.
14//! ```
15
16/// Messages between the wrapper and the resident commit service.
17pub mod service_protocol;
18
19/// The longest the wrapper waits for each thing it waits for, with the measurement beside each number.
20pub mod wait_ceilings;
21
22/// What the one landing thread is doing, shared with the threads that talk to waiting clients.
23pub mod service_busy;
24
25/// The connection of one waiting client, answered by the landing thread and kept alive by a beat from the reading thread.
26pub mod service_reply;
27
28/// The commit service's journal and its restart decisions.
29pub mod service_journal;
30
31/// Test-only fault points of the commit service.
32pub mod service_fault;
33
34/// The native journal protocol and the standard error fallback the service's entries go through.
35pub mod journald_native;
36
37/// The lines the commit service writes about its life and about the time each request took.
38pub mod service_timing;
39
40/// The line the commit service writes when a signal ends it.
41pub mod service_signal;
42
43/// The commit service's loop.
44pub mod service_server;
45
46/// The wrapper's side of a commit through the commit service.
47pub mod service_client;
48
49/// The wrapper's own provisioning of the commit service's socket activation.
50pub mod service_provision;
51
52/// A minimal D-Bus client for the user session bus, for the provisioning's two calls.
53pub mod systemd_dbus;
54
55/// Which commit service instance belongs to a worktree: its name, socket and unit instances.
56pub mod service_instance;
57
58/// One entry from the wrapper a person ran to the journal, sent without waiting.
59#[cfg(target_os = "linux")]
60pub mod client_journal;
61
62/// The service's handler for a review work item, bounded by a call deadline and a total budget.
63pub mod service_review;
64
65/// The standards-review credential: redacted when printed, read from the wrapper's environment, sent in the work message.
66pub mod service_review_key;