Skip to main content

Crate spider_route

Crate spider_route 

Source
Expand description

Picks the cheapest Spider Cloud request settings that are likely to work.

This crate makes one decision and makes it locally: given the shape of a request, which settings should the first attempt use. It does no network work, runs no async runtime, and holds no API client, so depending on it costs a consumer nothing but the vocabulary.

A model is optional. With no weights compiled in, HeuristicRouter answers from rules alone, and that path is tested on its own so it cannot rot.

Re-exports§

pub use action::Country;
pub use action::InvalidCountry;
pub use action::ProxyPool;
pub use action::RequestMode;
pub use action::PROXY_POOLS;
pub use decision::Action;
pub use decision::RouteDecision;
pub use decision::RouteSource;
pub use decision::Wait;
pub use domain::host_shape;
pub use domain::registrable_domain;
pub use domain::HostShape;
pub use domain::IpKind;
pub use domain::TldSlot;
pub use features::featurize;
pub use features::CallerPins;
pub use features::DeclaredNeed;
pub use features::ExtClass;
pub use features::FeatureVector;
pub use features::KeyClass;
pub use features::RouteInput;
pub use features::SegmentClass;
pub use features::SiteMemory;
pub use features::StatusClass;
pub use features::FEATURES_USED;
pub use features::FEATURE_DIM;
pub use heuristic::HeuristicRouter;
pub use heuristic::Rule;
pub use router::AttemptOutcome;
pub use router::Router;
pub use router::RouterVersion;

Modules§

action
The vocabulary a routing decision is made in.
decision
What a router answers with.
domain
The only place a host string is read.
features
What the router is allowed to look at.
heuristic
The rules, which are what ships until weights exist.
router
The boundary between deciding and fetching.