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

Add node metadata filtering to remaining endpoints #2654

Merged
merged 2 commits into from
Jan 15, 2017

Conversation

kyhavlov
Copy link
Contributor

This adds support for filtering by node metadata values to the following endpoints:

/v1/catalog/service/<service>
/v1/health/state/<state>
/v1/health/checks/<service>
/v1/health/service/<service>

It also updates /v1/catalog/nodes and /v1/catalog/services to support multiple metadata filters.

Copy link
Contributor

@slackpad slackpad left a comment

Choose a reason for hiding this comment

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

Just some tiny stuff - looks great! I'm going to go ahead and merge so I can rebase.


for _, tc := range cases {
var out structs.IndexedHealthChecks
inState := structs.ServiceSpecificRequest{
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a stale name.

@@ -287,6 +289,15 @@ type Node struct {
}
type Nodes []*Node

func SatisfiesMetaFilters(meta map[string]string, filters map[string]string) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should add a comment for this one.

@slackpad slackpad merged commit 1380fdb into master Jan 15, 2017
@slackpad slackpad deleted the f-metafilter-endpoints branch January 15, 2017 01:07
kyhavlov added a commit that referenced this pull request Jan 18, 2017
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.

2 participants