Something went wrong. Try again.
KGLW listening stats, maybe more? lil gleam experiment too
Something went wrong. Try again.
12345678910111213141516171819202122232425import envoyimport gleam/erlang/processimport gleam/otp/static_supervisorimport gleam/resultimport protogizz/consumerimport protogizz/store
pub fn main() -> Nil { let store_name = process.new_name("store") let db_path = envoy.get("PROTOGIZZ_DB") |> result.unwrap("./data/protogizz.db") let tap_url = envoy.get("PROTOGIZZ_TAP_URL") |> result.unwrap("http://localhost:2480/channel")
let assert Ok(_) = static_supervisor.new(static_supervisor.OneForOne) |> static_supervisor.add(store.supervised(store_name, db_path)) |> static_supervisor.add(consumer.supervised(store_name, tap_url)) |> static_supervisor.restart_tolerance(10, 30) |> static_supervisor.start
process.sleep_forever()}