Skip to main content

Module remap_links

Module remap_links 

Source
Expand description

A links network under other addresses (issue #149): every address that goes down is mapped to the network’s own, and every address that comes up is mapped back, so the code above never thinks about remapping.

The map is an AddressMap: an OffsetAddressMap moves a network out of the way of another, so a UnionLinks of them shadows nothing, and an AddressTable gives the addresses of another system addresses of our own. Strings from outside, such as UUIDs, are bound to links by LinksExternalIds.

A read that names an address that is not of the network below finds nothing; a write that names one fails. The null link reads the same on both sides. The C# twin is RemapLinksDecorator<TLinkAddress>, the JavaScript one RemapLinks of @link-foundation/link-cli-client, whose addresses above may be strings such as UUIDs.

Structs§

AddressTable
A table of the addresses above and below: an address below that has none above yet gets the next free one from first on, so the addresses of another system (a server, a service) read as addresses of our own range. pairs and add keep the table across runs, in links or anywhere else.
OffsetAddressMap
Every address moved by the same offset: the network below reads at offset + 1 and up, so networks moved by different offsets share no address and a UnionLinks of them shadows nothing.
RemapLinks
links under the addresses of map; see the module documentation.

Traits§

AddressMap
How the addresses of a network below a RemapLinks read above it. Only addresses of links are mapped: the null link is the null link on both sides.