pub struct OperatorSection {
pub session_ttl_secs: Option<u64>,
pub grace_window_hours: Option<i64>,
pub never_wrote_min_idle_secs: Option<u64>,
pub dns_resolver: Option<String>,
}Expand description
The operator: how long their sign-in lasts, and how long their claim outlives a poll that cannot see it.
Reload: needs a restart. The TTL is read once when the sign-in is built, and a session already issued keeps the lifetime it was issued with; the grace window is handed to the operator poll when it is spawned.
Fields§
§session_ttl_secs: Option<u64>How long a signed-in operator stays signed in, in seconds. Mirrors
--operator-session-ttl.
Reasonable range: 300 to 86_400 — five minutes to a day.
Below five minutes an operator is signing in again mid-incident, which is the one time the round trip to their own server is least welcome. Above a day the window in which a borrowed browser stays the operator outlives any sitting a person actually had. The built-in default is twelve hours: one working day, so a sign-in in the morning does not expire before the evening.
Nothing enforces the range — it is documented for whoever sets this, not checked — but a value outside it is worth a second thought.
grace_window_hours: Option<i64>Hours an unreachable operator keeps this deployment writing, counted
from the moment their bot.did.operator claim stops standing. No
flag mirrors this, only this key. Applied to
didbot_serve::operator_poll::configure.
Only a running server counts it. One restarted while the operator’s PDS is down boots unclaimed, and refuses writes and creates until that PDS answers, however long this is.
Reasonable range: 1 to 168 — an hour to a week.
This is a trade between two ways of being wrong. Short, and an operator whose own PDS is down for an afternoon takes this deployment’s accounts down with it, because the poll cannot see a claim that is still there. Long, and an operator who has genuinely stood down leaves accounts writing under a vouch nobody is behind. An hour is about as short as the poll’s own interval makes meaningful; a week outlasts most outages and most holidays. The built-in default is six hours: long enough to sleep through, short enough that a stood-down operator is not a month of writes.
never_wrote_min_idle_secs: Option<u64>The shortest idleFor a neverWrote account delete takes, in
seconds. A shorter one is refused. No flag mirrors this, only this
key.
Reasonable range: 3600 to 604_800 — an hour to a week.
An agent’s account is created before its session makes its first write. Below an hour, a delete can take an account that is about to write. The built-in default is an hour. Nothing enforces the range, but zero is read as one second, since a delete always names a span.
dns_resolver: Option<String>The DNS-over-HTTPS resolver the operator’s handle is checked
through: it is asked for the _atproto TXT record under the handle
the operator’s DID document claims, before the homepage names them
by it. Default https://cloudflare-dns.com/dns-query.
Reasonable range: an https:// DNS-over-HTTPS (RFC 8484) endpoint
that also answers the JSON form, ?name=&type=TXT answered as
application/dns-json: Cloudflare’s, Google’s at
https://dns.google/resolve, or one on this deployment’s own network.
Anything else refuses startup. Whoever runs the resolver sees the
operator’s handle once per operator poll.
Trait Implementations§
Source§impl Clone for OperatorSection
impl Clone for OperatorSection
Source§fn clone(&self) -> OperatorSection
fn clone(&self) -> OperatorSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OperatorSection
impl Debug for OperatorSection
Source§impl Default for OperatorSection
impl Default for OperatorSection
Source§fn default() -> OperatorSection
fn default() -> OperatorSection
Source§impl<'de> Deserialize<'de> for OperatorSection
impl<'de> Deserialize<'de> for OperatorSection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for OperatorSection
impl PartialEq for OperatorSection
Source§fn eq(&self, other: &OperatorSection) -> bool
fn eq(&self, other: &OperatorSection) -> bool
self and other values to be equal, and is used by ==.