Events.poll: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/daemon/events.bend as Events Lines 122-125 of cswap-bend-cli@0.1.0.0/daemon/events.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/daemon/events.bend&start_line=122&end_line=125 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json # fetchErrors and windowsPct appear only when non-empty. def poll(+ts: String, +active: Json.Json, +rows: List<&2, Row>, +threshold: U32) -> Json.Json: event("poll", ts, pair("active", active, pair("headroomPct", Json.JObj{headroom_chain(rows)}, pair("threshold", fl(threshold), opt_obj(errors_all(rows), "fetchErrors", opt_obj(windows_all(rows), "windowsPct", Json.JNil{})))))) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/events.bend&name=Row https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/events.bend&name=errors_all https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/events.bend&name=event https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/events.bend&name=fl https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/events.bend&name=headroom_chain https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/events.bend&name=opt_obj https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/events.bend&name=pair https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/events.bend&name=windows_all https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json