def answer.hub

ezx@1.11.0.0 · src/lock/run.bend:135

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/hub/get.bend as Net
import ezx@1.11.0.0/src/share/say.bend as Say
import ezx@1.11.0.0/src/share/spin.bend as Spin
import ezx@1.11.0.0/src/lock/lock.bend as L
import ezx@1.11.0.0/src/lock/world.bend as W

135# a hub package: its manifest, then every file it names
136def answer.hub(+hub: String, +hash: String) -> IO(W.Answer):
137  do IO<W.Answer>:
138    +s : Say.Spin <- Spin.hold(Say.dep.hub(hash))
139    g : Web.Got <- Net.fetch(L.url_of(hub, hash, "manifest"), L.want(hash))
140    a : W.Answer <- hub.got(g, hub, hash)
141    Spin.done(s)
142    return a

Uses (15)

Used by (1)