pub enum Op {
Ingress,
Presence,
Decide {
validate: Core,
},
Fold {
step: Core,
init: Core,
},
Durable,
Map {
f: Core,
},
Map2 {
f: Core,
},
PerSession {
f: Core,
},
FilterMap {
f: Core,
},
Alias,
}Expand description
What a vertex does. One variant per construct in §3.7’s signal vocabulary.
Variants§
Ingress
merge_clients() — the one place time and nondeterminism enter.
Presence
presence() — who is connected now.
A source like Op::Ingress and a Signal rather than a Stream: connections are a value
defined at all times, not occurrences. It is the only vertex here that is neither the log
nor derived from it, which is the one fact everything else about it follows from — see
crate::split for what that forbids and crate::plan for what it costs.
Decide
decide(proposals, state, validate) — §3.5’s authority chokepoint, as a node.
Fold
fold(step, init, stream). The accumulator, and the point at which a cycle bottoms out.
Durable
durable(signal) — the accumulator that survives a restart, and therefore the one the log
is of.
Map
signal_map(s, f).
Map2
map2(f, a, b).
PerSession
per_session(s, f) — §3.8’s fanout point, first-class so that Phase 3 can share the
arrangement above it.
FilterMap
filter_map(s, f) on a stream.
Alias
A signal declared as another signal: mirror: Signal[T] = todos.