def route.open
bend-kit-http@0.38.2.0 · http.bend:3526
import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-dns@0.7.0.0/dns.bend as Dns
3526
3527def route.open(+ms: U32, offer: Bool, route: Route) -> IO(Result<&1, &1, Err, Conn>):
3528 match route:
3529 case RouteDirect{tls, +host, port, cert, ca}:
3530 do IO<Result<&1, &1, Err, Conn>>:
3531 ips : List<&2, String> <- Dns.resolve.all(host)
3532 conn.open.all(tls, ms, host, port, ips, cert, offer, ca)
3533 case RouteProxy{tls, host, port, sni, authority, authorization, cert, ca}:
3534 proxy.route.open(ms, tls, host, port, sni, authority, authorization, cert, ca)