ac78c23021
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.
26 lines
537 B
YAML
26 lines
537 B
YAML
language: go
|
|
go:
|
|
- 1.8
|
|
- 1.9
|
|
- tip
|
|
|
|
env:
|
|
global:
|
|
- CC_TEST_REPORTER_ID=68feaa3410049ce73e145287acbcdacc525087a30627f96f04e579e75bd71c00
|
|
|
|
before_script:
|
|
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
|
- chmod +x ./cc-test-reporter
|
|
- ./cc-test-reporter before-build
|
|
|
|
install:
|
|
- go get github.com/go-task/task/cmd/task
|
|
|
|
script:
|
|
- task dl-deps
|
|
- task lint
|
|
- task test-coverage
|
|
|
|
after_script:
|
|
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|