def devices_via_network.go

near-architecture@0.9.1.0 · arc.bend:477

import near-architecture@0.9.1.0/arc.bend as Arc
import Base

477# A device reaches a server over the overlay only when the destination is exposed to the tailnet.
478def devices_via_network.go(xs: List<&2, Link>, +s: System) -> Bool:
479  match xs:
480    case []:
481      True{}
482    case l <> rest:
483      match l:
484        case Link{src, +dst, _, _}:
485          (Bool.not(is_device(role_of(src, s)) && is_server(role_of(dst, s))) ||
486            is_tailnet(exposure_of(dst, s))) && devices_via_network.go(rest, s)

Uses (12)

Used by (1)