Documentation
¶
Overview ¶
Package eventpattern holds the numeric-comparison and CIDR-matching core shared by EventBridge's and Pipes' event-pattern content filters (eb-event-patterns-content-based-filtering.html). Pipes' Filter.Pattern is specified as an EventBridge pattern with no grammar of its own, so the two services' matchers are meant to stay aligned; this package holds just the pieces that were already identical, so they no longer drift out of sync by hand. The two services' broader matcher-dispatch trees (operator support, unrecognized-key handling, validation) diverge enough that they are not unified here -- see bd gopherstack-amfu.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareNumeric ¶
CompareNumeric reports whether "num op val" holds for one of EventBridge's numeric matcher operators (eb-filtering-numeric-matching): >, >=, <, <=, =. An unrecognized op reports false.
func MatchCIDR ¶
MatchCIDR reports whether ipStr is an IP address inside the cidrStr range (eb-filtering-ip-address). Either being malformed reports false.
func MatchNumericRules ¶
MatchNumericRules applies EventBridge's numeric matcher rules to num. Rules come in (operator, value) pairs -- e.g. [">", 5, "<", 10] -- that must ALL hold; a malformed pair (wrong types) fails the match.
Types ¶
This section is empty.