Expand description
Routing, caching, merging and resilience over registered providers.
The engine owns what providers deliberately don’t: retries and backoff
(retry), request pacing and the real HTTP client (transport), and
choosing which provider answers what.
-
Lookup is interchangeable across providers: each ID goes to the providers that accept its kind, in priority order, until one finds it. A provider that doesn’t know an ID or fails falls through to the next; every attempt is reported.
-
Search is not interchangeable (rankings differ), so it runs against one provider: the one named, or the first capable one. Filters that provider doesn’t declare are stripped and reported as ignored, never silently dropped.
-
Resolve / verify turn a citation claim into scored candidates and a verdict (see
resolve). -
Caching: provider answers (records, “not found”, search pages) are cached with per-kind TTLs (
CachePolicy) and served stale if a provider fails; every answer says how it wasServed. -
Sharing: one engine serves many callers at once. Lookups already in flight are joined rather than repeated, and each caller sets its own patience with
CallOptions. Providers that can’t answer (a spent quota, a rejected key, repeated failures) are skipped until they can (Engine::unavailable).
Not yet: fan-out search.
Modules§
- retry
- Retrying one provider operation under its
ResiliencePolicy. - transport
- The engine’s side of the
HttpClientseam: a real client, and pacing.
Structs§
- Abstract
- An abstract and the provider it came from.
- Abstracts
Report - Attempt
- Budget
- What a provider last said was left of its budget.
- Cache
Policy - How long cached answers are trusted (DESIGN §5). Past these, a provider is asked again; if it then fails, the old answer is served as stale.
- Cache
Stats - Call
Options - How patient a caller is. The default is a batch caller’s: providers’
own policies, retries and all. Set on an engine view with
Engine::with_options; views share the cache, pacing and requests in flight. - Candidate
- Checked
- One checked claim.
- Crossref
Config - Datacite
Config - Difference
- A cited field the work disagrees with, and the work’s value if it’s worth showing.
- Disagreement
- One field on which a record and the registry’s record of the same DOI disagree.
- DoiConfig
- Engine
- Cheap to clone: clones, and views made with
with_options, share the cache, providers’ pacing and requests in flight. Hold one per process. - Engine
Builder - Europe
PmcConfig - Extras
- What to add to each record found.
- Inputs
Report - Looked
- Lookup
Report - Lookup
Result - Open
Alex Config - Open
Library Config - Resolve
Report - Search
Report - Sighting
- One provider surfacing a candidate.
- Sqlite
Cache - Standard
Config - Settings for the compiled-in providers.
Nonedisables a provider. - Verification
- Versions
Report
Enums§
- Cited
Field - Engine
Error - Finding
- Something to fix or know about one entry.
- Input
Lookup - One input’s lookup.
- Outcome
- The outcome of one provider’s attempt at one ID.
- Reason
- Why a verdict was reached. “The work” is the verdict’s candidate
(
Verification::best); “the identifiers” are those the claim gave. - Served
- Where an answer came from.
- Severity
- Store
Error - Verdict
- Via
- How a candidate was found.
Traits§
- Cache
- What the engine needs from a cache; it depends on this, not on SQLite.
- Pacing
- Request slots shared between processes, so parallel agents (and any other process using the same file) keep to one rate limit per provider.
Functions§
- describe_
update - “RETRACTED (2010-02-06, notice doi:…, via retraction-watch)”.
- disagreements
- Where
recordcontradictsregistry’s record of the same DOI. Dates compare by year, any of either record’s years counting (online-first and print years differ legitimately); pages by first page. - duplicates
- For each match, the earliest other match that is the same work (shares an identifier).
- findings
- Findings for one claim from its verification (not duplicates, which need the whole set).
- standard
- Builds an engine with each enabled provider behind its own paced
reqwestclient.
Type Aliases§
- Clock
- A clock, injectable so cache expiry is testable.
- Secret
String - Re-exported for credentials in provider configs. Secret string type.