eventing icon indicating copy to clipboard operation
eventing copied to clipboard

Event Lineage: Map Triggers to Graph Edges

Open Cali0707 opened this issue 1 year ago • 0 comments

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:

  1. Have the self property reference the trigger
  2. Have the from property reference the broker
  3. Have the to property reference the destination of the trigger subscriber
  4. Have the transform function set to be NoTransform 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:

  1. Have the self property reference the trigger
  2. Have the from property reference the broker
  3. Have the to property reference the DLS
  4. Have the transform function set to be NoTransform

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.

Cali0707 avatar Feb 14 '24 17:02 Cali0707