mirror of https://github.com/hashicorp/consul
afa1cc98d1
Fixes: #4222 # Data Filtering This PR will implement filtering for the following endpoints: ## Supported HTTP Endpoints - `/agent/checks` - `/agent/services` - `/catalog/nodes` - `/catalog/service/:service` - `/catalog/connect/:service` - `/catalog/node/:node` - `/health/node/:node` - `/health/checks/:service` - `/health/service/:service` - `/health/connect/:service` - `/health/state/:state` - `/internal/ui/nodes` - `/internal/ui/services` More can be added going forward and any endpoint which is used to list some data is a good candidate. ## Usage When using the HTTP API a `filter` query parameter can be used to pass a filter expression to Consul. Filter Expressions take the general form of: ``` <selector> == <value> <selector> != <value> <value> in <selector> <value> not in <selector> <selector> contains <value> <selector> not contains <value> <selector> is empty <selector> is not empty not <other expression> <expression 1> and <expression 2> <expression 1> or <expression 2> ``` Normal boolean logic and precedence is supported. All of the actual filtering and evaluation logic is coming from the [go-bexpr](https://github.com/hashicorp/go-bexpr) library ## Other changes Adding the `Internal.ServiceDump` RPC endpoint. This will allow the UI to filter services better. |
||
---|---|---|
.. | ||
acl.go | ||
acl_cache.go | ||
acl_cache_test.go | ||
acl_legacy.go | ||
acl_legacy_test.go | ||
acl_test.go | ||
catalog.go | ||
check_definition.go | ||
check_definition_test.go | ||
check_type.go | ||
config_entry.go | ||
connect.go | ||
connect_ca.go | ||
connect_ca_test.go | ||
connect_proxy_config.go | ||
connect_proxy_config_test.go | ||
connect_test.go | ||
errors.go | ||
intention.go | ||
intention_test.go | ||
operator.go | ||
prepared_query.go | ||
prepared_query_test.go | ||
sanitize_oss.go | ||
service_definition.go | ||
service_definition_test.go | ||
snapshot.go | ||
structs.go | ||
structs_filtering_test.go | ||
structs_test.go | ||
testing_catalog.go | ||
testing_connect_proxy_config.go | ||
testing_intention.go | ||
testing_service_definition.go | ||
txn.go |