def new

bend-kit-gateway@0.3.0.0 · gateway.bend:31

import bend-kit-gateway@0.3.0.0/gateway.bend as Gateway
import Base
import bend-kit-resources@0.1.0.0/resources.bend as Res
import bend-kit-cache@0.3.0.0/cache.bend as C

31# An empty gateway: `capacity` requests at once, and an empty cache.
32def new(+owner: Nat, capacity: Nat, policy: C.Policy) -> Gate:
33  Gate{Res.new(owner, capacity), Res.Grant{owner, 0n}, C.Cache.new(String, policy)}

Uses (7)

Used by (0)

No other definition uses this definition.