def hub.got
ezx@1.11.0.0 · src/lock/run.bend:125
import ezx@1.11.0.0/src/lock/run.bend as Run
import Base
import ezx@1.11.0.0/src/hub/hub.bend as Web
import ezx@1.11.0.0/src/lock/lock.bend as L
import ezx@1.11.0.0/src/lock/world.bend as W
125
126def hub.got(got: Web.Got, +hub: String, +hash: String) -> IO(W.Answer):
127 match got:
128 case Web.Miss{why}:
129 IO.pure(W.Answer, W.Miss{why})
130 case Web.Have{+body}:
131 do IO<W.Answer>:
132 gs : List<&2, Web.Got> <- hub.all(hub, hash, L.manifest.files(String.lines(body)))
133 return gots(W.Served{}, body, gs, [])