New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[added] filter system requests by JS domain #2194
Conversation
server/events.go
Outdated
@@ -1077,6 +1077,7 @@ type EventFilterOptions struct { | |||
Cluster string `json:"cluster,omitempty"` // filter by cluster name | |||
Host string `json:"host,omitempty"` // filter by host name | |||
Tags []string `json:"tags,omitempty"` // filter by tags (must match all tags) | |||
Domain string `json:domain,omitempty` // filter by JS domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad syntax
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tag syntax
server/events.go
Outdated
@@ -1164,6 +1165,11 @@ func (s *Server) filterRequest(fOpts *EventFilterOptions) bool { | |||
} | |||
} | |||
} | |||
if fOpts.Domain != _EMPTY_ { | |||
if js := s.getJetStream(); js == nil || js.config.Domain != fOpts.Domain { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just do if s.getOpts().JetStreamDomain != _EMPTY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Matthias Hanel <mh@synadia.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Matthias Hanel mh@synadia.com