UniqueKey generates a unique string key for a Command based on its operation type, item type, and detail. Is is used to avoid adding duplicate commands to the action plan.
(c Command)
| 54 | // UniqueKey generates a unique string key for a Command based on its operation type, item type, and detail. |
| 55 | // Is is used to avoid adding duplicate commands to the action plan. |
| 56 | func UniqueKey(c Command) string { |
| 57 | return fmt.Sprintf("%s:%s:%s", c.OperationType(), c.ItemType(), c.Detail()) |
| 58 | } |
| 59 | |
| 60 | // ActionPlan orchestrates the sequence of operations (Commands) to manage CrowdSec hub items. |
| 61 | type ActionPlan struct { |
no test coverage detected
searching dependent graphs…