diff --git a/Cargo.lock b/Cargo.lock index 2aa0b964..91094878 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1041,7 +1041,6 @@ version = "0.1.0" dependencies = [ "axum", "base64 0.22.1", - "didbot-agentd", "didbot-authstore", "didbot-data", "didbot-dns", @@ -1514,7 +1513,6 @@ dependencies = [ "base64 0.22.1", "didbot-claim-check", "didbot-data", - "didbot-dns", "didbot-http", "didbot-identity", "didbot-pds", diff --git a/crates/didbot-agentd/src/node.rs b/crates/didbot-agentd/src/node.rs index 469e40b7..321b81d4 100644 --- a/crates/didbot-agentd/src/node.rs +++ b/crates/didbot-agentd/src/node.rs @@ -211,11 +211,6 @@ impl Node { }) } - /// The directory the key lives in. - pub fn dir(&self) -> &Path { - &self.dir - } - /// The identity this host holds, once one has been registered. pub fn host(&self) -> Option { self.host diff --git a/crates/didbot-agentd/src/registrar.rs b/crates/didbot-agentd/src/registrar.rs index c1279c9f..cc856db9 100644 --- a/crates/didbot-agentd/src/registrar.rs +++ b/crates/didbot-agentd/src/registrar.rs @@ -166,11 +166,6 @@ impl Pds { } } - /// The origin this client talks to. - pub fn base(&self) -> &str { - &self.base - } - fn url(&self, nsid: &str) -> String { format!("{}/xrpc/{nsid}", self.base) } diff --git a/crates/didbot-avatar/src/canvas.rs b/crates/didbot-avatar/src/canvas.rs index 7435c53e..84527cbc 100644 --- a/crates/didbot-avatar/src/canvas.rs +++ b/crates/didbot-avatar/src/canvas.rs @@ -179,31 +179,6 @@ impl Canvas { ); } - /// A line of a given thickness, with rounded ends. - pub fn stroke(&mut self, x0: f32, y0: f32, x1: f32, y1: f32, width: f32, colour: Rgb) { - let half = width / 2.0; - let (dx, dy) = (x1 - x0, y1 - y0); - let length_squared = dx * dx + dy * dy; - self.fill( - ( - x0.min(x1) - half, - y0.min(y1) - half, - x0.max(x1) + half, - y0.max(y1) + half, - ), - colour, - |x, y| { - let t = if length_squared <= f32::EPSILON { - 0.0 - } else { - (((x - x0) * dx + (y - y0) * dy) / length_squared).clamp(0.0, 1.0) - }; - let (nx, ny) = (x - (x0 + t * dx), y - (y0 + t * dy)); - nx * nx + ny * ny < half * half - }, - ); - } - /// A filled triangle. pub fn triangle(&mut self, points: [(f32, f32); 3], colour: Rgb) { let [a, b, c] = points; diff --git a/crates/didbot-identity/src/did.rs b/crates/didbot-identity/src/did.rs index d92fad93..92148d22 100644 --- a/crates/didbot-identity/src/did.rs +++ b/crates/didbot-identity/src/did.rs @@ -153,11 +153,6 @@ impl Zone { &self.pds_host } - /// The development port, if this zone has one. - pub fn port(&self) -> Option { - self.port - } - /// The `did:web` naming the server itself, rather than any account on it. /// /// This is the DID a human's vouch record points at when it says "this is diff --git a/crates/didbot-identity/src/document.rs b/crates/didbot-identity/src/document.rs index 875e6263..64f68213 100644 --- a/crates/didbot-identity/src/document.rs +++ b/crates/didbot-identity/src/document.rs @@ -229,8 +229,7 @@ impl DidDocument { /// document could list a real handle second and have this answer yes to a /// name no resolver would ever return for it. /// - /// Compared case-insensitively, because a handle is a hostname; see - /// [`crate::handle::normalize`]. + /// Compared case-insensitively, because a handle is a hostname. /// /// [`handle`]: Self::handle pub fn claims_handle(&self, handle: &str) -> bool { diff --git a/crates/didbot-identity/src/handle.rs b/crates/didbot-identity/src/handle.rs index 9fe23b0f..82ffde91 100644 --- a/crates/didbot-identity/src/handle.rs +++ b/crates/didbot-identity/src/handle.rs @@ -106,24 +106,6 @@ pub fn validate(handle: &str) -> Result<(), HandleError> { /// Path an atproto handle resolves through over HTTPS. pub const ATPROTO_DID_PATH: &str = "/.well-known/atproto-did"; -/// Prefix of the DNS name the TXT resolution method reads. -/// -/// Declared and unused, deliberately. The TXT method is not implemented here -/// naming the label costs nothing and means a later reader -/// does not have to go looking for what the record would have been called. -pub const ATPROTO_DNS_PREFIX: &str = "_atproto"; - -/// Lowercases a handle for comparison. -/// -/// The handle specification's answer to case is to normalize before -/// comparing, not to refuse: `A.ISI.EDU` and `a.isi.edu` are one name. Every -/// comparison in this workspace goes through this or through -/// `eq_ignore_ascii_case`, and a handle is ASCII by [`validate`], so the two -/// agree. -pub fn normalize(handle: &str) -> String { - handle.to_ascii_lowercase() -} - /// Where `handle` is resolved over HTTPS, or why it cannot be. /// /// `port` is for development only and follows the same rule diff --git a/crates/didbot-identity/src/lib.rs b/crates/didbot-identity/src/lib.rs index afa3ff20..cd5f699b 100644 --- a/crates/didbot-identity/src/lib.rs +++ b/crates/didbot-identity/src/lib.rs @@ -49,8 +49,7 @@ pub use did::{ }; pub use document::{Claim, DidDocument, OidcIdentity, Service, VerificationMethod}; pub use handle::{ - atproto_did_url, normalize as normalize_handle, parse_atproto_did, validate as validate_handle, - HandleError, ATPROTO_DID_PATH, + atproto_did_url, parse_atproto_did, validate as validate_handle, HandleError, ATPROTO_DID_PATH, }; pub use resolve::{ document_url, resolve, DidDocumentSource, InMemoryDocuments, ResolveError, diff --git a/crates/didbot-onboarding/src/browser.rs b/crates/didbot-onboarding/src/browser.rs index 9a81cbbb..05b3b27d 100644 --- a/crates/didbot-onboarding/src/browser.rs +++ b/crates/didbot-onboarding/src/browser.rs @@ -81,16 +81,6 @@ impl Default for BrowserEnvironment { } impl BrowserEnvironment { - /// The same environment, with `operator` answering - /// [`Capability::OperatorSession`]. - #[must_use] - pub fn with_operator(self, operator: S) -> BrowserEnvironment { - BrowserEnvironment { - resolver: self.resolver, - operator: Some(operator), - } - } - /// The DoH resolver this page asks. #[must_use] pub fn resolver(&self) -> &str { diff --git a/crates/didbot-onboarding/src/native.rs b/crates/didbot-onboarding/src/native.rs index cc03a7e3..99bc8b42 100644 --- a/crates/didbot-onboarding/src/native.rs +++ b/crates/didbot-onboarding/src/native.rs @@ -2,9 +2,8 @@ //! //! Everything: HTTPS with no same-origin rule, the machine's own stub //! resolver, DoH for the record types a stub resolver has no API for, and -//! the certificate the connection actually rests on. The one thing it has -//! not got by default is a signed-in operator, which arrives through -//! [`NativeEnvironment::with_operator`]. +//! the certificate the connection actually rests on. A signed-in operator is +//! the one thing a caller supplies. use crate::doh; use crate::env::{ @@ -54,24 +53,6 @@ impl Default for NativeEnvironment { } impl NativeEnvironment { - /// The same environment, with `operator` answering - /// [`Capability::OperatorSession`]. - #[must_use] - pub fn with_operator(self, operator: S) -> NativeEnvironment { - NativeEnvironment { - client: self.client, - resolver: self.resolver, - operator: Some(operator), - } - } - - /// The DoH resolver this environment asks for the record types a stub - /// resolver has no API for. - #[must_use] - pub fn resolver(&self) -> &str { - &self.resolver - } - /// One DoH query, as one HTTPS GET. async fn doh(&self, name: &str, record_type: (u16, &str)) -> Result, String> { let url = doh::query_url(&self.resolver, name, record_type.1); diff --git a/crates/didbot-onboarding/src/step.rs b/crates/didbot-onboarding/src/step.rs index 805438f7..dde7d6f9 100644 --- a/crates/didbot-onboarding/src/step.rs +++ b/crates/didbot-onboarding/src/step.rs @@ -180,15 +180,6 @@ impl Step { } } } - - /// The step one of `check`'s outcomes belongs to. - #[must_use] - pub fn of(check: Check) -> Step { - *Step::ALL - .iter() - .find(|step| step.checks().contains(&check)) - .expect("every Check appears in exactly one Step::checks") - } } impl core::fmt::Display for Step { diff --git a/crates/didbot-onboarding/src/verdict.rs b/crates/didbot-onboarding/src/verdict.rs index aa47d43e..54554fbb 100644 --- a/crates/didbot-onboarding/src/verdict.rs +++ b/crates/didbot-onboarding/src/verdict.rs @@ -60,12 +60,6 @@ impl Verdict { } } - /// Whether this check is satisfied. Only [`Self::Passed`] is. - #[must_use] - pub fn is_passed(&self) -> bool { - matches!(self, Verdict::Passed { .. }) - } - /// The reason, for a failure. #[must_use] pub fn reason(&self) -> Option<&str> { diff --git a/crates/didbot-operator/src/operate/preflight.rs b/crates/didbot-operator/src/operate/preflight.rs index 4dbd0240..a5080b9c 100644 --- a/crates/didbot-operator/src/operate/preflight.rs +++ b/crates/didbot-operator/src/operate/preflight.rs @@ -61,12 +61,6 @@ pub struct Report { } impl Report { - /// What one check found, if it ran. - #[must_use] - pub fn outcome(&self, check: Check) -> Option<&Verdict> { - self.run.verdict(check) - } - /// Every check and its outcome, in order. pub fn all(&self) -> impl Iterator { self.run @@ -90,13 +84,6 @@ impl Report { pub fn first_failure(&self) -> Option<(Check, &str)> { self.run.first_failure() } - - /// The run behind this report, for a caller that wants the steps rather - /// than the lines. - #[must_use] - pub fn run(&self) -> &Run { - &self.run - } } impl fmt::Display for Report { diff --git a/crates/didbot-pds/src/hosted.rs b/crates/didbot-pds/src/hosted.rs index a031dbc0..5e70a57a 100644 --- a/crates/didbot-pds/src/hosted.rs +++ b/crates/didbot-pds/src/hosted.rs @@ -82,11 +82,6 @@ impl HostedDid { pub fn did(&self) -> &AccountDid { &self.0 } - - /// Consumes the proof, keeping the DID. - pub fn into_did(self) -> AccountDid { - self.0 - } } impl Deref for HostedDid { diff --git a/crates/didbot-pds/src/kind.rs b/crates/didbot-pds/src/kind.rs index a29a7b96..b4b46bae 100644 --- a/crates/didbot-pds/src/kind.rs +++ b/crates/didbot-pds/src/kind.rs @@ -145,15 +145,7 @@ impl Default for NameProvenance { } } -impl NameProvenance { - /// A short kebab-case label, for logs. - pub fn label(self) -> &'static str { - match self { - Self::Issued => "issued", - Self::Asserted => "asserted", - } - } -} +impl NameProvenance {} /// How long an account keeps resolving after it stops being used. /// @@ -272,15 +264,6 @@ impl Retention { Self::Until { seconds } => idle > Duration::seconds(seconds), } } - - /// A short label, for logs. - pub fn label(self) -> &'static str { - match self { - Self::Deployment => "deployment", - Self::Until { .. } => "until", - Self::Forever => "forever", - } - } } #[cfg(test)] diff --git a/crates/didbot-pds/src/ledger.rs b/crates/didbot-pds/src/ledger.rs index a8808b9a..e89510b8 100644 --- a/crates/didbot-pds/src/ledger.rs +++ b/crates/didbot-pds/src/ledger.rs @@ -256,16 +256,6 @@ pub enum EdgeKind { Attested, } -impl EdgeKind { - /// The label a log line and a ledger entry use. - pub fn as_str(self) -> &'static str { - match self { - EdgeKind::Vouched => "vouched", - EdgeKind::Attested => "attested", - } - } -} - /// One entry: what happened, when, and where it sits in the sequence. #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] diff --git a/crates/didbot-pds/src/lockout.rs b/crates/didbot-pds/src/lockout.rs index 2d3cc806..54c16f89 100644 --- a/crates/didbot-pds/src/lockout.rs +++ b/crates/didbot-pds/src/lockout.rs @@ -181,14 +181,6 @@ impl Locks { self.0.iter().any(|tag| tag.lock == lock) } - /// The parties that have hung `lock`. - pub fn parties(&self, lock: Lock) -> impl Iterator + '_ { - self.0 - .iter() - .filter(move |tag| tag.lock == lock) - .map(|tag| tag.party) - } - /// Hangs `tag`. False when it was already there. pub fn hang(&mut self, tag: Tag) -> bool { self.0.insert(tag) @@ -326,11 +318,6 @@ impl Holds { self.0.is_empty() } - /// Every hold, in declaration order. - pub fn iter(&self) -> impl Iterator { - self.0.iter() - } - /// Whether `hold` is set. pub fn has(&self, hold: Hold) -> bool { self.0.contains(&hold) diff --git a/crates/didbot-pds/src/records.rs b/crates/didbot-pds/src/records.rs index 662259d5..8f281a04 100644 --- a/crates/didbot-pds/src/records.rs +++ b/crates/didbot-pds/src/records.rs @@ -95,16 +95,6 @@ impl ListParams { self.limit } - /// The record key this page resumes after, if any. - pub fn cursor(&self) -> Option<&str> { - self.cursor.as_deref() - } - - /// Whether this page reads oldest first. - pub fn is_reversed(&self) -> bool { - self.reverse - } - /// The cursor a caller hands back to get the page after `page`. /// /// `None` when the page did not fill, which is how a listing says there @@ -2202,11 +2192,6 @@ impl HeapRecordStore { } } - /// The heap the values live in. - pub fn heap(&self) -> &Arc { - &self.heap - } - /// Takes the lock, recovering from a poisoned mutex. fn repos(&self) -> std::sync::MutexGuard<'_, BTreeMap> { self.repos diff --git a/crates/didbot-policy-cedar/src/lib.rs b/crates/didbot-policy-cedar/src/lib.rs index 3136a07b..613247a9 100644 --- a/crates/didbot-policy-cedar/src/lib.rs +++ b/crates/didbot-policy-cedar/src/lib.rs @@ -210,12 +210,6 @@ impl CedarEvaluator { } } - /// The shapes this engine validates and types records with. - #[must_use] - pub fn shapes(&self) -> &Shapes { - &self.shapes - } - fn document(&self, compiled: CompiledId) -> Result, EvalError> { let index = usize::try_from(compiled.0) .map_err(|_| EvalError::Failed(format!("no compiled document {}", compiled.0)))?; diff --git a/crates/didbot-policy-records/src/merge.rs b/crates/didbot-policy-records/src/merge.rs index 11d6b5b2..c60603d9 100644 --- a/crates/didbot-policy-records/src/merge.rs +++ b/crates/didbot-policy-records/src/merge.rs @@ -209,16 +209,6 @@ fn register_builtin(builder: &mut PolicyTreeBuilder, builtin: BuiltinPolicy) -> }) } -/// Attach every malformed-record reason a source collected onto a -/// [`LoadReport`] -- a small helper so a caller wiring one in does not need -/// to know [`LoadReport`]'s field name. -impl LoadReport { - /// Record additional malformed-record reasons. - pub fn add_malformed(&mut self, reasons: impl IntoIterator) { - self.malformed.extend(reasons); - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/crates/didbot-schema/src/lib.rs b/crates/didbot-schema/src/lib.rs index 4a301aad..f54f23d0 100644 --- a/crates/didbot-schema/src/lib.rs +++ b/crates/didbot-schema/src/lib.rs @@ -392,15 +392,6 @@ impl Catalog { } } - /// Every method this catalog defines, in NSID order. - pub fn methods(&self) -> Vec<&str> { - self.documents - .iter() - .filter(|(_, defs)| matches!(defs.get("main"), Some(Def::Method(..)))) - .map(|(id, _)| id.as_str()) - .collect() - } - /// Checks a JSON response body against the output schema `nsid` declares. /// /// The whole reason this exists: a response is a value with a schema, the diff --git a/crates/didbot-serve/src/lib.rs b/crates/didbot-serve/src/lib.rs index fb000b13..291726a4 100644 --- a/crates/didbot-serve/src/lib.rs +++ b/crates/didbot-serve/src/lib.rs @@ -5,7 +5,7 @@ //! can read while it happens. //! //! The whole surface is built around one object-safe trait, -//! [`Registry`]. The provisioner is generic over its DNS provider and its +//! [`didbot_pds::Registry`]. The provisioner is generic over its DNS provider and its //! account store; the HTTP layer must not be, or every handler signature //! carries type parameters that no route cares about. `Arc` is //! where that genericity stops. @@ -129,13 +129,11 @@ pub use wire::{ use std::convert::Infallible; use std::future::{ready, Ready}; use std::net::SocketAddr; -use std::sync::Arc; use std::task::{Context, Poll}; use axum::extract::connect_info::{ConnectInfo, Connected}; use axum::http::Request; use axum::Router; -use didbot_pds::Registry; use tokio::net::TcpListener; use tower::limit::{ConcurrencyLimit, ConcurrencyLimitLayer}; use tower::{Layer, Service}; @@ -211,25 +209,10 @@ pub fn init_tracing() { .try_init(); } -/// Serves [`app`] on `listener` until Ctrl-C, with a health tick running. -/// -/// The tick is stopped before this returns, so the last thing in the log is -/// the shutdown, not a heartbeat for a server that has already stopped. -pub async fn serve(listener: TcpListener, registry: Arc) -> std::io::Result<()> { - let tick = HealthTick::spawn(registry.clone(), DEFAULT_HEALTH_INTERVAL); - let router = app_with_health(registry, tick.state()); - let result = serve_router(listener, router).await; - tick.stop().await; - result -} - /// Serves an already-built router on `listener` until `SIGINT` or /// `SIGTERM`, waiting at most [`SHUTDOWN_GRACE`] on connections that will /// not close by themselves. /// -/// Separate from [`serve`] so that a caller who wired its own stream producer -/// through [`app_with_repos`] can still use the same shutdown behaviour. -/// /// `router` is served through `limited_make_service`, the wrapping /// [`serve_tls`] serves through too, so [`MAX_CONCURRENT_REQUESTS`] bounds /// this listener the same way — see its own doc for why that bound is wired @@ -560,7 +543,8 @@ impl StopHandlers { } } -/// Resolves when this process is asked to stop: `SIGTERM`, or Ctrl-C. +/// Resolves when this process is asked to stop: `SIGTERM`, or Ctrl-C. The +/// handlers are registered before this returns. /// /// `SIGTERM` is the half a deployment actually uses: `docker stop` sends it, /// systemd's own `ExecStop` sends it, and a process that is PID 1 in a @@ -576,16 +560,6 @@ impl StopHandlers { /// that request's whole window. Awaiting it more than once is fine; each /// caller installs its own listener. /// -/// The handlers go in when this future is first polled. A caller that does -/// anything between deciding to stop on a signal and awaiting one — announcing -/// itself, or handing the future to a loop that polls it later — wants -/// [`installed_shutdown_signal`] instead. -pub async fn shutdown_signal() { - installed_shutdown_signal().await; -} - -/// [`shutdown_signal`], with the handlers registered before this returns. -/// /// tokio hands a signal only to the listeners that existed when it arrived, so /// the gap between building an observation and first polling it is a gap a /// stop can fall into. [`serve_router`] holds that gap open across the whole of diff --git a/crates/didbot-serve/src/oauth/dpop.rs b/crates/didbot-serve/src/oauth/dpop.rs index 27e9d88c..79109e5b 100644 --- a/crates/didbot-serve/src/oauth/dpop.rs +++ b/crates/didbot-serve/src/oauth/dpop.rs @@ -422,13 +422,6 @@ impl DpopVerifier { } } - /// Mints a fresh nonce and makes it the one [`DpopVerifier::verify`] - /// accepts, for a challenge sent before any proof has been seen at all - /// (an initial 401/400 with no `DPoP` header to check yet). - pub fn issue_nonce(&self) -> String { - self.issue_nonce_at(OffsetDateTime::now_utc()) - } - fn issue_nonce_at(&self, now: OffsetDateTime) -> String { let fresh = random_nonce(); let mut state = self.nonces.lock().unwrap_or_else(|p| p.into_inner()); diff --git a/crates/didbot-serve/src/oauth/error.rs b/crates/didbot-serve/src/oauth/error.rs index 59ee7e70..438a4f73 100644 --- a/crates/didbot-serve/src/oauth/error.rs +++ b/crates/didbot-serve/src/oauth/error.rs @@ -101,17 +101,6 @@ impl OAuthError { }, } } - - /// The RFC 6749 `error` value, for a test or a caller that wants to - /// switch on it without parsing the body. - pub fn code(&self) -> &'static str { - self.body.error - } - - /// The status this error answers with. - pub fn status(&self) -> StatusCode { - self.status - } } impl IntoResponse for OAuthError { diff --git a/crates/didbot-serve/src/policy_poll.rs b/crates/didbot-serve/src/policy_poll.rs index 094d792c..ede2d69c 100644 --- a/crates/didbot-serve/src/policy_poll.rs +++ b/crates/didbot-serve/src/policy_poll.rs @@ -321,21 +321,11 @@ impl PolicyPoll { Ok(Some(revision)) } - /// The revision in force. - pub fn current(&self) -> Arc { - self.set.current() - } - /// What the newest observation refused, if it refused anything. pub fn rejected(&self) -> Option> { self.set.rejected() } - /// The digest the gate enforces, once a set has been built. - pub fn enforced(&self) -> Option { - self.gate.enforced() - } - /// What the gate enforces, as an operator reads it back. pub fn enforced_set(&self) -> Option> { self.gate.enforced_set() diff --git a/crates/didbot-serve/src/relay.rs b/crates/didbot-serve/src/relay.rs index 1e23b178..e862bd5f 100644 --- a/crates/didbot-serve/src/relay.rs +++ b/crates/didbot-serve/src/relay.rs @@ -169,12 +169,6 @@ impl RelayClient { } } - /// This client's relay base URL, for a log line or a reply an operator - /// reads — not for building a request; that happens internally. - pub fn base_url(&self) -> &str { - &self.base_url - } - /// Asks this client's relay to crawl `hostname`, over `requestCrawl`. pub async fn request_crawl(&self, hostname: &str) -> Result<(), RelayCrawlError> { self.call(REQUEST_CRAWL_NSID, hostname).await diff --git a/crates/didbot-serve/src/routes.rs b/crates/didbot-serve/src/routes.rs index f2a447c7..159e1903 100644 --- a/crates/didbot-serve/src/routes.rs +++ b/crates/didbot-serve/src/routes.rs @@ -518,9 +518,8 @@ pub fn app_with_health(registry: Arc, health: Arc) -> /// working exactly as it did before [`AuthState`] existed. /// /// `health` should be [`HealthTick::state`](crate::HealthTick::state) from -/// the tick a caller has spawned for this registry — see [`crate::serve`], -/// which does exactly that. A router built any other way here answers -/// `/health`'s `progress` from a state nothing ever ticks. +/// the tick a caller has spawned for this registry. A router built any other +/// way here answers `/health`'s `progress` from a state nothing ever ticks. pub fn app_with_auth( registry: Arc, auth: AuthState, diff --git a/crates/didbot-serve/src/subscribers.rs b/crates/didbot-serve/src/subscribers.rs index 3e8dab8c..6c6da20e 100644 --- a/crates/didbot-serve/src/subscribers.rs +++ b/crates/didbot-serve/src/subscribers.rs @@ -130,37 +130,6 @@ impl Drop for SubscriberSlot { } } -/// A stream that owns its [`SubscriberSlot`]. -/// -/// The handler returns as soon as the response head is written, so the slot -/// has to live somewhere that outlives it. This is that somewhere: the stream -/// is dropped when the subscriber disconnects, and the slot with it. -pub struct Held { - stream: S, - _slot: SubscriberSlot, -} - -impl Held { - /// Ties `slot` to `stream`. - pub fn new(slot: SubscriberSlot, stream: S) -> Self { - Self { - stream, - _slot: slot, - } - } -} - -impl futures_core::Stream for Held { - type Item = S::Item; - - fn poll_next( - self: std::pin::Pin<&mut Self>, - cx: &mut std::task::Context<'_>, - ) -> std::task::Poll> { - std::pin::Pin::new(&mut self.get_mut().stream).poll_next(cx) - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/crates/didbot-swarm/Cargo.toml b/crates/didbot-swarm/Cargo.toml index 68afbaaf..d2d0622d 100644 --- a/crates/didbot-swarm/Cargo.toml +++ b/crates/didbot-swarm/Cargo.toml @@ -39,7 +39,6 @@ didbot-claim-check.workspace = true # what it asserts is read straight off that server's stores and stream. axum.workspace = true didbot-data.workspace = true -didbot-dns.workspace = true didbot-identity.workspace = true didbot-pds.workspace = true didbot-serve.workspace = true diff --git a/crates/didbot-swarm/src/lib.rs b/crates/didbot-swarm/src/lib.rs index 906205fe..0a790f50 100644 --- a/crates/didbot-swarm/src/lib.rs +++ b/crates/didbot-swarm/src/lib.rs @@ -1020,11 +1020,6 @@ impl Swarm { self.step(Action::Spawn).await } - /// Ends one agent, and everything it spawned. - pub async fn end(&mut self) -> Result<(), SwarmError> { - self.step(Action::End).await - } - /// Decides what one beat does, and reserves what it will touch. /// /// A write marks its agent, and the record it revises or removes, as in diff --git a/crates/didbot-tls/src/dns.rs b/crates/didbot-tls/src/dns.rs index 8627d8da..d3c6ff9d 100644 --- a/crates/didbot-tls/src/dns.rs +++ b/crates/didbot-tls/src/dns.rs @@ -155,15 +155,6 @@ impl InMemoryAcmeDns { Self::default() } - /// The issuance policy recorded for `zone`, if any. - pub fn policy(&self, zone: &str) -> Option { - self.caa - .lock() - .unwrap_or_else(|poisoned| poisoned.into_inner()) - .get(zone) - .cloned() - } - /// The values currently published at `name`, if any. pub fn values(&self, name: &str) -> Option> { self.published diff --git a/crates/didbot-tls/src/manager.rs b/crates/didbot-tls/src/manager.rs index 610d447c..6f64e1dd 100644 --- a/crates/didbot-tls/src/manager.rs +++ b/crates/didbot-tls/src/manager.rs @@ -386,20 +386,6 @@ impl CertificateManager { self.cert.clone() } - /// The one `rustls::ServerConfig` this process should build. Backed by - /// [`Self::resolver`], so it never needs rebuilding across a renewal -- - /// see `resolver.rs` for why a swap under it is enough. - pub fn server_config(&self) -> Arc { - let mut config = rustls::ServerConfig::builder() - .with_no_client_auth() - .with_cert_resolver(self.cert.clone()); - // ACME's HTTP-01 and TLS-ALPN-01 challenges are not used here -- - // this crate only ever completes DNS-01 -- but application protocol - // negotiation still matters for ordinary traffic. - config.alpn_protocols = vec![b"h2".to_vec(), b"http/1.1".to_vec()]; - Arc::new(config) - } - /// How urgently the current renewal state should be surfaced, right now. pub async fn alert_level(&self) -> AlertLevel { self.tracker diff --git a/crates/didbot/Cargo.toml b/crates/didbot/Cargo.toml index 98425299..c5441413 100644 --- a/crates/didbot/Cargo.toml +++ b/crates/didbot/Cargo.toml @@ -32,9 +32,6 @@ didbot-repo.workspace = true # can hold the writing side and the reading side of `bot.did.operator` at the # same time, which is the same reason the conformance suites live here. didbot-operator.workspace = true -# The agent host's daemon, so `tests/reservation.rs` can drive a host from -# its reservation to its contexts' accounts against the real router. -didbot-agentd.workspace = true # `reqwest` is here so one test can read this server's sync endpoints the way # anything else would: over HTTP, from outside the process. reqwest.workspace = true