Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement TAWS Alert Prioritization.
DO-367 Class C is not very detailed about alert prioritization nor does it describe tests. It just gives an example table.
The opentaws crate provides an
TawsAlertSourcePrioritization
trait which can be optionally implemented on the AlertSource type. It describes static rules for prioritization.If
TawsAlertSourcePrioritization
is implemented an extension trait is implemented on theTawsAlerts
type, which provides an additional functionprioritize
.prioritize
can be used to turn the unsorted set of alerts (TawsAlerts
) into a sorted set of alerts (TawsPrioritizedAlerts
), which then provides an integer index.The prioritization happens based on rules which assign a unique priority to a tuple of (AlertSource, Level) with the notion that an alert from the specified AlertSource, with a level greater than or equal to the level specified in the rule is cached by the rule and placed somewhere in the sorted set in the range 0..=priority.