flow-mumu 0.2.0-rc.9

Stream transform tools plugin for the Lava language
Documentation
extend("flow")
extend("net")
extend("json")
extend("sys")

run = (int#delay, int#timeout_ms) => {
  start = sys:timestamp_ms()
  flow:compose(
    flow:drain_async,
    flow:stop_when(_ => sys:timestamp_ms() >= start + timeout_ms),
    flow:chain(row => slog(json:encode(row))),
    flow:throttle(delay)
  )
}

run(100, 5000)(
  net:lldp([
    ifaces:["eth0","eth1"],
    mode:"listen",
    protocols:["LLDP","CDP"],
    ttl:120
  ])
)