eventing
eventing copied to clipboard
Event Lineage: Map Triggers to Graph Edges
Problem To construct the event lineage graph properly, a function should be created that maps the trigger struct into a Edge struct. Specifically, this edge should:
- Have the
self
property reference the trigger - Have the
from
property reference the broker - Have the
to
property reference the destination of the trigger subscriber - Have the
transform
function set to beNoTransform
for now - the actual transform will be handled in later issues since it is very complicated and depends on the type of filter.
Additionally, if the trigger has a deadLetterSink set on the Delivery struct in the spec, another edge should be created. This edge should:
- Have the
self
property reference the trigger - Have the
from
property reference the broker - Have the
to
property reference the DLS - Have the
transform
function set to beNoTransform
When writing this function, you can assume that it will be called with the trigger struct as well as a map[duckv1.Destination]Vertex
which contains all of the vertices in the eventing graph.
Persona: Which persona is this feature for?
Exit Criteria A unit test showing that the Edge struct is constructed properly from a Trigger
Time Estimate (optional): How many developer-days do you think this may take to resolve? 1
Additional context (optional) Add any other context about the feature request here.