38typedef enum : uint8_t {
Per-site descriptor loaded from a flat key=value config file.
int mdl_discover_run(const mdl_discover_req_t *req, size_t pick, char *out_url, size_t out_cap)
Run one search/browse discovery: fetch, parse, present, and select.
mdl_discover_mode_t
Which discovery endpoint of a site descriptor to query.
@ k_mdl_discover_browse
browse_url latest-updates page, no term.
@ k_mdl_discover_search
search_url with a {q} term substitution.
Jittered inter-request delay plus the per-host politeness governor.
Session identity (honest User-Agent) and robots.txt gating.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Injected dependencies and inputs for one discovery run.
mdl_hit_list_t * hits
Receives the parsed hits (borrowed).
ra8_io_stream_t * output
Borrowed normal-output byte sink.
mdl_session_t * session
Initialised session (net + UA + robots).
const char * term
Raw search term; ignored/NULL for browse.
ra8_err_t * io_error
Caller-owned first sink failure latch.
mdl_governor_t * gov
Initialised per-host politeness governor.
const mdl_site_t * site
Descriptor holding the discovery keys.
uint32_t timeout_ms
Per-request time budget, milliseconds.
mdl_discover_mode_t mode
Search or browse.
size_t page_cap
Capacity of page_buf in bytes.
ra8_io_stream_t * diagnostic
Borrowed diagnostic byte sink.
char * page_buf
Results-page fetch scratch (borrowed).
Closed-loop per-host politeness governor (rate + backoff + concurrency).
Bounded list of titled hits plus the raw anchor tally.
One download session's identity and robots.txt state.
One site's scraping rules (all data, no logic).
Caller-allocated byte-stream handle binding a sink to its context.