cliswitch.bend relies on unsafe/foreign
raw source on the hub · import cswap-bend-cli@0.1.0.0/cliswitch.bend as Cliswitch
12 imports
import Base import ./setload.bend as Setload import ./store/base.bend as SBase import ./store/seq.bend as SSeq import ./json.bend as Json import ./fs.bend as Fs import ./act.bend as Act import ./cmd.bend as Cmd import ./settings.bend as Settings import ./swbase.bend as SwBase import ./swlive.bend as SwLive import ./switch.bend as Switch
Types
type Gate source · line 77 · raw
Data
The models that gate a strategy switch: --model wins, else the autoswitch.model setting; none for a plain rotation or a direct switch.
Gate@models:List<&2, String> -> @source:String -> Gate
Definitions
def delay_of source · line 14 · raw
@r:Result<&1, &1, Pair(U32, String), String> -> U32
def oracle_of source · line 21 · raw
@r:Result<&1, &1, Pair(U32, String), String> -> 0x0717344745a30ebad1f19045228e8f18/swlive.Oracle
def opts_of source · line 28 · raw
@d:Result<&1, &1, Pair(U32, String), String> -> @o:Result<&1, &1, Pair(U32, String), String> -> 0x0717344745a30ebad1f19045228e8f18/swlive.Opts
def switch_opts source · line 34 · raw
IO(0x0717344745a30ebad1f19045228e8f18/swlive.Opts)
How long to wait before the post-switch re-read ($CSWAP_SWITCH_VERIFY_DELAY_MS, default 2000 ms) and where the ownership lookup comes from ($CSWAP_SWITCH_ORACLE_FILE names a JSON file in tests; unset means the profile endpoint).
def warns_text source · line 38 · raw
@ws:List<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> String
def switch_text source · line 47 · raw
@+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> String
def switch_ok source · line 50 · raw
@+json:Bool -> @+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> 0x0717344745a30ebad1f19045228e8f18/cmd.Out
def switch_fail2 source · line 57 · raw
@+json:Bool -> @+c:U32 -> @+m:String -> 0x0717344745a30ebad1f19045228e8f18/cmd.Out
def switch_fail source · line 64 · raw
@+json:Bool -> @ce:Pair(U32, String) -> 0x0717344745a30ebad1f19045228e8f18/cmd.Out
def switch_out source · line 68 · raw
@+json:Bool -> @r:0x0717344745a30ebad1f19045228e8f18/fs.Res(0x0717344745a30ebad1f19045228e8f18/json.Json) -> @+models:List<&2, String> -> @+source:String -> 0x0717344745a30ebad1f19045228e8f18/cmd.Out
def gate_model source · line 80 · raw
@model:Maybe<&2, String> -> @+cfg:0x0717344745a30ebad1f19045228e8f18/json.Json -> Gate
def gate_of source · line 87 · raw
@strategy:Maybe<&2, String> -> @model:Maybe<&2, String> -> @+cfg:0x0717344745a30ebad1f19045228e8f18/json.Json -> Gate
def gate_models source · line 94 · raw
@g:Gate -> List<&2, String>
def switch_run source · line 99 · raw
@+ctx:0x0717344745a30ebad1f19045228e8f18/store/base.Ctx -> @ident:Maybe<&2, String> -> @+force:Bool -> @+strategy:Maybe<&2, String> -> @+gate:Gate -> @+opts:0x0717344745a30ebad1f19045228e8f18/swlive.Opts -> 0x0717344745a30ebad1f19045228e8f18/act.of(0x0717344745a30ebad1f19045228e8f18/json.Json)
def gate_source source · line 106 · raw
@g:Gate -> String
def switch_cmd2 source · line 111 · raw
@+ctx:0x0717344745a30ebad1f19045228e8f18/store/base.Ctx -> @ident:Maybe<&2, String> -> @+force:Bool -> @+strategy:Maybe<&2, String> -> @+gate:Gate -> @+json:Bool -> @+opts:0x0717344745a30ebad1f19045228e8f18/swlive.Opts -> IO(0x0717344745a30ebad1f19045228e8f18/cmd.Out)
def switch_cmd source · line 115 · raw
@+ctx:0x0717344745a30ebad1f19045228e8f18/store/base.Ctx -> @ident:Maybe<&2, String> -> @+force:Bool -> @+strategy:Maybe<&2, String> -> @model:Maybe<&2, String> -> @+json:Bool -> IO(0x0717344745a30ebad1f19045228e8f18/cmd.Out)