def poll_row

cswap-bend-cli@0.1.0.0 · daemon/view.bend:234

import cswap-bend-cli@0.1.0.0/daemon/view.bend as View
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/policy/types.bend as T
import cswap-bend-cli@0.1.0.0/policy/usage.bend as PU
import cswap-bend-cli@0.1.0.0/daemon/events.bend as Ev
import cswap-bend-cli@0.1.0.0/daemon/gather.bend as G

234# One poll row: windows only for a trusted reading; the error only when the
235# usage is unknown.
236def poll_row(+e: G.Ent, +u: T.Usage, +rows: Json.Json, +ms: List<&2, String>, +now: Nat) -> Ev.Row:
237  match e:
238    case G.Ent{+slot, email, org, creds, acct}:
239      poll_row2(slot, PU.trusted(u, now, ms), u, err_text(row_of(rows, e)), ms, now)

Uses (11)

Used by (1)