def wire.resolve

emerging-ezhttp@0.21.0.0 · src/wire.bend:251

import emerging-ezhttp@0.21.0.0/src/wire.bend as Wire
import Base
import bend-kit-dns@0.6.0.2/dns.bend as Dns

251# a host's addresses: a numeric address or localhost as it is, else the OS
252# resolver's answer
253def wire.resolve(+host: String, literal: List<&2, String>)
254  -> IO(Result<&1, &1, U32 & String, List<&2, String>>):
255  match literal:
256    case []:
257      IO.bind(Result<&1, &1, U32 & String, String>,
258        Result<&1, &1, U32 & String, List<&2, String>>,
259        Dns.lookup.all(String.to_lower(host)), wire.looked)
260    case ip <> t:
261      IO.pure(Result<&1, &1, U32 & String, List<&2, String>>, Done{ip <> t})

Uses (11)

Used by (1)