def pol_cfg

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

import cswap-bend-cli@0.1.0.0/daemon/view.bend as View
import Base
import cswap-bend-cli@0.1.0.0/policy/types.bend as T
import cswap-bend-cli@0.1.0.0/daemon/config.bend as Cfg

33# serve TTL 180 s; the rest is the settings.
34def pol_cfg(+c: Cfg.Cfg) -> T.Config:
35  match c:
36    case Cfg.Cfg{th, iv, cd, hy, st, ia, ut, ms}:
37      T.Config{nat(th), ms, strategy_of(st), nat(iv), nat(cd), nat(hy), 180n, nat(ut), ia}

Uses (4)

Used by (4)