Ops.via_tailnet: def of near-v-framework@0.4.0.0 Import: import near-v-framework@0.4.0.0/domain/architecture/ops.bend as Ops Lines 417-426 of near-v-framework@0.4.0.0/domain/architecture/ops.bend: https://jend.leeeet.dev/read.txt?path=near-v-framework@0.4.0.0/domain/architecture/ops.bend&start_line=417&end_line=426 import Base import near-v-framework@0.4.0.0/general/compound/ops.bend as CO import near-v-framework@0.4.0.0/general/compound/edge/type.bend as E import near-v-framework@0.4.0.0/domain/architecture/system/container/type.bend as Ct # ---- a device reaches a server only over the tailnet ---- def via_tailnet(es: List<&2, E.Edge>, +cs: List<&2, Ct.Container>, +servers: List<&2, String>, +devices: List<&2, String>) -> Bool: match es: case []: True{} case e <> rest: match e: case E.Edge{x, +y, _, _}: (Bool.not(CO.has(devices, home(x, cs)) && CO.has(servers, home(y, cs))) || is_tailnet(exposure_of(home(y, cs), cs))) && via_tailnet(rest, cs, servers, devices) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/ops.bend&name=exposure_of https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/ops.bend&name=home https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/ops.bend&name=is_tailnet https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/container/type.bend&name=Container https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/general/compound/edge/type.bend&name=Edge https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/general/compound/ops.bend&name=has