cyberbit / telem

Trivial ETL Engine for Minecraft
http://telem.cyberbit.dev
Other
26 stars 4 forks source link

Add support for custom adapters #3

Closed cyberbit closed 11 months ago

cyberbit commented 1 year ago

Concept:

backplane:addInput('custom_in_1', function ()
  -- do stuff

  -- can also return MetricCollection, this is sugar
  return {
    custom_metric_1 = 123,
    custom_metric_2 = 4.999127
  }
end)

backplane:addOutput('custom_out_1', function (metrics)
  -- metrics = {
  --   {
  --     name = 'metric',
  --     value = 123,
  --     unit = 'unit',
  --     adapter = 'adapter',
  --     source = 'source'
  --   },
  --   ...
  -- }

  -- do stuff
end)