Match checks whether the given entity matches any of the endpoint definitions in the list.
(ctx context.Context, entity *intel.Entity)
| 89 | |
| 90 | // Match checks whether the given entity matches any of the endpoint definitions in the list. |
| 91 | func (e Endpoints) Match(ctx context.Context, entity *intel.Entity) (result EPResult, reason Reason) { |
| 92 | for _, entry := range e { |
| 93 | if entry == nil { |
| 94 | continue |
| 95 | } |
| 96 | |
| 97 | if result, reason = entry.Matches(ctx, entity); result != NoMatch { |
| 98 | return |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | return NoMatch, nil |
| 103 | } |
| 104 | |
| 105 | // MatchMulti checks whether the given entities match any of the endpoint |
| 106 | // definitions in the list. Every rule is evaluated against all given entities |
no test coverage detected