~/bend-docscommunity

daemon/live.bend checks

raw source on the hub · import cswap-bend-cli@0.1.0.0/daemon/live.bend as Live

6 imports
import Base
import ../json.bend as Json
import ../fs.bend as Fs
import ../setload.bend as Setload
import ../profile.bend as P
import ./config.bend as Cfg

Types

type Tag source · line 17 · raw

Data

The profile and strategy a tick decided under, for the events and the log.

type Live source · line 21 · raw

Data

What a run holds besides the settings it reads each tick.

Definitions

def raw_of source · line 24 · raw

@+text:String -> 0x0717344745a30ebad1f19045228e8f18/json.Json

def laid source · line 27 · raw

@+c:0x0717344745a30ebad1f19045228e8f18/daemon/config.Cfg -> @+res:0x0717344745a30ebad1f19045228e8f18/profile.Res -> 0x0717344745a30ebad1f19045228e8f18/daemon/config.Cfg

def cfg_res source · line 34 · raw

@+text:String -> @+fl:0x0717344745a30ebad1f19045228e8f18/daemon/config.Flags -> @+res:0x0717344745a30ebad1f19045228e8f18/profile.Res -> 0x0717344745a30ebad1f19045228e8f18/daemon/config.Cfg

def tag_of source · line 37 · raw

@+res:0x0717344745a30ebad1f19045228e8f18/profile.Res -> @+c:0x0717344745a30ebad1f19045228e8f18/daemon/config.Cfg -> Maybe<&2, Tag>

def cfg_for source · line 45 · raw

@+text:String -> @+fl:0x0717344745a30ebad1f19045228e8f18/daemon/config.Flags -> @+over:Maybe<&2, String> -> 0x0717344745a30ebad1f19045228e8f18/daemon/config.Cfg

The effective settings of a tick.

def tag_for source · line 48 · raw

@+text:String -> @+fl:0x0717344745a30ebad1f19045228e8f18/daemon/config.Flags -> @+over:Maybe<&2, String> -> Maybe<&2, Tag>

def unknown2 source · line 52 · raw

@+res:0x0717344745a30ebad1f19045228e8f18/profile.Res -> @+over:Maybe<&2, String> -> Maybe<&2, String>

A name given with --profile that matches no profile.

def unknown source · line 59 · raw

@+text:String -> @+over:Maybe<&2, String> -> Maybe<&2, String>

def live_for source · line 62 · raw

@+text:String -> @+fl:0x0717344745a30ebad1f19045228e8f18/daemon/config.Flags -> @+over:Maybe<&2, String> -> Live

def live_flags source · line 65 · raw

@+l:Live -> 0x0717344745a30ebad1f19045228e8f18/daemon/config.Flags

def live_over source · line 70 · raw

@+l:Live -> Maybe<&2, String>

def live_tag source · line 75 · raw

@+l:Live -> Maybe<&2, Tag>

def text_of source · line 80 · raw

@r:0x0717344745a30ebad1f19045228e8f18/fs.Res(String) -> String

def read_text source · line 88 · raw

@+root:String -> IO(String)

settings.json as text; "" when it cannot be read.

def kind_is source · line 93 · raw

@+k:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> @+name:String -> Bool

def decision_event source · line 100 · raw

@+e:0x0717344745a30ebad1f19045228e8f18/json.Json -> Bool

def tag_one2 source · line 103 · raw

@+decision:Bool -> @+t:Tag -> @+e:0x0717344745a30ebad1f19045228e8f18/json.Json -> 0x0717344745a30ebad1f19045228e8f18/json.Json

def tag_one source · line 111 · raw

@+t:Tag -> @+e:0x0717344745a30ebad1f19045228e8f18/json.Json -> 0x0717344745a30ebad1f19045228e8f18/json.Json

A decision event with the profile and strategy it was made under added at the end.

def tag_events2 source · line 114 · raw

@+t:Tag -> @+es:List<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> List<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json>

def tag_events source · line 121 · raw

@+m:Maybe<&2, Tag> -> @+es:List<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> List<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json>

def tag_log source · line 129 · raw

@+m:Maybe<&2, Tag> -> @+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> 0x0717344745a30ebad1f19045228e8f18/json.Json

The log line with the profile and strategy added, when a profile is in force.