~/bend-docscommunity

src/vmm/loggate.bend checks

raw source on the hub · import 0x60ac8ec10d74b6dd53fa983c6826c23f/src/vmm/loggate.bend as Loggate

2 imports
import Base
import ../lib/u64.bend as U

Types

type Gate source · line 10 · raw

Data

type GateOut source · line 13 · raw

Data

Definitions

def Gate.full source · line 16 · raw

U32

def Gate.refill source · line 21 · raw

@+tokens:U32 -> @+last:0x60ac8ec10d74b6dd53fa983c6826c23f/src/lib/u64.U64 -> @+now:0x60ac8ec10d74b6dd53fa983c6826c23f/src/lib/u64.U64 -> U32

The bucket at now (ms), from the gate's last time: 20 thousandths a ms, at most full (10 s of refill is all it takes).

def Gate.step source · line 29 · raw

@g:Gate -> @+now:0x60ac8ec10d74b6dd53fa983c6826c23f/src/lib/u64.U64 -> GateOut

A message at now: dropped (verdict 0, one more counted) when the bucket holds less than one; else it passes, taking one, with verdict 1 + the messages dropped since the last that passed.

def Gate.wire source · line 36 · raw

@+ws:List<&2, U32> -> Gate

def Gate.now source · line 39 · raw

@+ws:List<&2, U32> -> 0x60ac8ec10d74b6dd53fa983c6826c23f/src/lib/u64.U64