diff options
Diffstat (limited to 'src/http/routes')
| -rw-r--r-- | src/http/routes/mod.rs | 6 | ||||
| -rw-r--r-- | src/http/routes/mutations.rs | 3 | ||||
| -rw-r--r-- | src/http/routes/pages.rs | 9 |
3 files changed, 3 insertions, 15 deletions
diff --git a/src/http/routes/mod.rs b/src/http/routes/mod.rs index e78cc74..0dfed52 100644 --- a/src/http/routes/mod.rs +++ b/src/http/routes/mod.rs @@ -1,9 +1,3 @@ -//! Route handlers (§12). -//! -//! Every handler reads through `db.read` — the thread-local read-only -//! connection — and hands mutations to the writer actor. A slow client can -//! therefore never hold the write lock, which is the whole point of the split. - use crate::db::{self, builds, model::*}; use crate::review::candidates; use crate::time; diff --git a/src/http/routes/mutations.rs b/src/http/routes/mutations.rs index 133d491..79089b2 100644 --- a/src/http/routes/mutations.rs +++ b/src/http/routes/mutations.rs @@ -1,6 +1,3 @@ -//! The write side of the UI: every handler that changes something, and the flash -//! it answers with. - use crate::db::{self, builds}; use crate::review::{approve as ap, candidates}; use crate::pipeline; diff --git a/src/http/routes/pages.rs b/src/http/routes/pages.rs index dea7de0..f1f3ef8 100644 --- a/src/http/routes/pages.rs +++ b/src/http/routes/pages.rs @@ -1,5 +1,3 @@ -//! The read side of the UI: pages that only ever go through `db.read`. - use crate::db::{self, builds, Db}; use crate::review::{candidates, diff, risk}; use crate::ops; @@ -554,10 +552,9 @@ pub(crate) fn audit(state: &State, req: &Req) -> Res { /// `GET /metrics` in Prometheus text exposition format (§12, §15). /// -/// Everything here is computed from live state on every scrape. There are no -/// counters incremented at event sites, because a counter that has to be -/// maintained by every code path is a counter that quietly drifts the first time -/// a path is added; a query cannot drift. +/// Everything here is computed from live state on every scrape. There are no counters +/// incremented at event sites: a counter every code path has to maintain quietly +/// drifts the first time a path is added; a query cannot drift. pub fn metrics(state: &State) -> Res { match ops::metrics(&state.cfg, &state.db) { Ok(m) => { |
