tremor-runtime icon indicating copy to clipboard operation
tremor-runtime copied to clipboard

a way to determine the input port of an event

Open Licenser opened this issue 4 years ago • 1 comments

Describe the problem you are trying to solve

In tremor script we currently have no way to determine what input port an event came from, this makes it harder to run different logics based on this information.

Describe the solution you'd like

One option would be a tremor::system::port() function (name just a suggestion) that returns the port, an alternative would be extending trickle to run different sets of logic based on the port but with a shared state something like (just a though experiment):

create script badger
with
<config>
script on in
 ... some logic ...
script on snot
  ... some other logic ..
end;

create script badger;

select event from in into badger;
select event from in/snot into badger/snot;

Licenser avatar Apr 16 '21 08:04 Licenser

This is one part of this RFC: https://github.com/tremor-rs/tremor-rfcs/pull/46

mfelsche avatar Sep 30 '21 09:09 mfelsche