Skip to content
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 streams by subject #1062

Merged
merged 2 commits into from Aug 31, 2022
Merged

[ADDED] Filter streams by subject #1062

merged 2 commits into from Aug 31, 2022

Conversation

piotrpio
Copy link
Collaborator

Resolves #1061

@coveralls
Copy link

coveralls commented Aug 31, 2022

Coverage Status

Coverage decreased (-0.03%) to 85.534% when pulling a0c2915 on strems-list-subject-filter into 5af7980 on main.

js.go Outdated
@@ -359,6 +361,17 @@ func DirectGetNext(subject string) JSOpt {
})
}

// StreamListFilter is an option that can be used to configure `StreamsInfo()` and `StreamNames()` requests.
// It allows filtering the retured streams by subject associated with each stream.
// Wildcards can be used. For example, `StreamListFilter(FOO.>.A) will return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FOO.>.A is an invalid subject I think, maybe switch to the asterisk wildcard variant:

Suggested change
// Wildcards can be used. For example, `StreamListFilter(FOO.>.A) will return
// Wildcards can be used. For example, `StreamListFilter(FOO.*.A) will return

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that - fixed

Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add filtering by subject when listing streams and stream names
3 participants