def policy_row

cswap-bend-cli@0.1.0.0 · pollrow.bend:208

import cswap-bend-cli@0.1.0.0/pollrow.bend as Pollrow
import Base
import cswap-bend-cli@0.1.0.0/policy/types.bend as PT
import cswap-bend-cli@0.1.0.0/poll.bend as Poll

208# The policy core's view of a stored row: its windows, freshness and holds.
209def policy_row(+r: Row) -> PT.Usage:
210  match r:
211    case Row{fetched, lg, la, fl, le, bu, np, iv, l429, st, sfp, cu, hu}:
212      policy_with(Poll.policy_usage(lg), fetched, bu, le, fl, np, iv, st, hu, lease_until(cu, la))

Uses (5)

Used by (1)