Skip to content

Commit

Permalink
log matching: add double matcher (#37)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Klein <[email protected]>
  • Loading branch information
mattklein123 authored Dec 31, 2024
1 parent 72ab67b commit 45ed6e6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/bitdrift_public/protobuf/matcher/v1/log_matcher.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ message LogMatcher {
OPERATOR_UNSPECIFIED = 0;
OPERATOR_LESS_THAN = 1;
OPERATOR_LESS_THAN_OR_EQUAL = 2;
// For double matching this is an epsilon comparison.
OPERATOR_EQUALS = 3;
OPERATOR_GREATER_THAN = 4;
OPERATOR_GREATER_THAN_OR_EQUAL = 5;
Expand All @@ -44,7 +45,13 @@ message LogMatcher {
// Used to define a match rule for a numeric value of type int32.
message IntValueMatch {
Operator operator = 1 [(validate.rules).enum.defined_only = true];
int32 match_value = 2 [(validate.rules).message = {required: true}];
int32 match_value = 2;
}

// Used to define a match rule for a numeric value of type double.
message DoubleValueMatch {
Operator operator = 1 [(validate.rules).enum.defined_only = true];
double match_value = 2;
}

// Used to define a match rule for semantic versioning (e.g. 1.02.43).
Expand Down Expand Up @@ -72,6 +79,7 @@ message LogMatcher {
IntValueMatch int_value_match = 3;
SemVerValueMatch sem_ver_value_match = 4;
IsSetMatch is_set_match = 5;
DoubleValueMatch double_value_match = 6;
}
}

Expand Down

0 comments on commit 45ed6e6

Please sign in to comment.