Expand description
Listing another mesh (CONTRACT-http-listing, http 0.6.0): the functions of a mesh this mesh does not host, as descriptions only, with no cells stored.
A run for one listed host is two steps, so that the store side is tested without a network:
fetch: read-only HTTP against the host’s origin (L2): the key document (SPEC 9: host, keys, validity), the mesh document (agreeing onhostandproto), the host’s own catalogue cells<host>/catalog/subject(...)(each verified against the key document, its keys andsource(k)names taken, the cell dropped), and for each name under<host>/,describeand/descriptor/<hash>(the bytes must hash to the function hash), and its label and description from/fn/<name>?format=json(describe carries neither). Never a cell, slice or receipt of a listed function. WithinLimits; past one, what is verified so far is kept and the cut recorded.apply: writes the result into the store (L3, L8): the present state only, nothing when nothing changed.
run_host is the two together; the mesh’s listing thread calls it for each host of
Config::listed_meshes every Config::listing_interval.
Structs§
- Applied
- What
applydid. - Fetched
Name - One verified name of a listed host.
- Limits
- The limits of one run of one host (L2.5).
- Listing
Error - A failure of
apply(the store’s), which leaves the store as it was before the failing write.
Enums§
- Cut
- Which limit cut a run.
- Fetch
- What one fetch of a host gave.
- Outcome
- The outcome of a run, as
/metricsreports it.
Constants§
- DEFAULT_
INTERVAL - The default interval between two runs of one host (
DATUMESH_LISTING_INTERVAL_SECS, six hours). - MAX_
HOSTS - The most hosts
DATUMESH_LISTED_MESHESmay name. - UNREACHABLE_
DROP_ AFTER - How long a host may be unreachable before its listings drop out (L8), counted from the first failed run after the last success. At exactly seven days it drops out; at six days 23 hours it does not.
Functions§
- apply
- Applies a fetch of
hostatnow(an instant) to the store (L3, L8, the re-review’s N1, N3, N4): - fetch
- Fetches
hostatorigin(L2), read-only, withinlimits;now(an instant) is the time the key document’s keys must be valid at. - origin_
of - Where
hostis reached: its origin inConfig::peerswhen it has one, elsehttps://<host>. - run_
host fetchthenapply.