Skip to main content

Module select

Module select 

Source
Expand description

Source selection: given a backend’s default sources (plus user config), pick which one to use — by pin, priority order, or fastest-probe (auto).

Probing and disk-cached results are the meat of M3; this module also exposes active_source used by every backend to resolve a single source now.

Functions§

active_source
Resolve the single source to use right now for backend.
effective_sources
Assemble the effective source list for a backend: defaults minus disabled, plus user custom sources, honoring per-tool config.
kind_label
Human-readable kind label.
probe_all
Probe every source concurrently, returning results (failed ones included).
ranked_source_candidates
Rank an already-filtered effective source set with the same pin, cache, offline, and live-probe policy as ranked_source_list. Backends use this when they must narrow candidates before any network probe, for example to keep private package names away from public registries.
ranked_source_list
The full list of candidate sources, best-first. Used for download failover: callers try each in order until one succeeds.
refresh
Force a refresh of the probe cache for a backend (used by osdk source test and --refresh-sources). Returns the fresh results.