WIP: [ISSUE-66918282] support long poll for "/configurations" (#23)

* [ISSUE-66918282] support long poll for "/configurations"

* [ISSUE-66918282] add tests

* [ISSUE-66918282] fix bugs for long-polling

* [ISSUE-66918282] Read DB only once for all subscribers

* [ISSUE-66918282] use long-poll in apid-core, improve style

* [ISSUE-66918282]

* [ISSUE-66918282] update tests, improve style

* [ISSUE-66918282] refactor tests

* [ISSUE-66918282] update tests

* [ISSUE-66918282] update README and swagger
14 files changed
tree: 0a53eef4ae9fb8dc4ddc61a650562d4b42452d60
  1. .gitignore
  2. .travis.yml
  3. api.go
  4. api_test.go
  5. apidGatewayConfDeploy-api.yaml
  6. apidGatewayConfDeploy_suite_test.go
  7. bundle.go
  8. bundle_test.go
  9. CONTRIBUTING.md
  10. cover.sh
  11. data.go
  12. data_test.go
  13. get_ready_deployments.sql
  14. glide.yaml
  15. init.go
  16. LICENSE
  17. listener.go
  18. listener_test.go
  19. mock_test.go
  20. pluginData.go
  21. README.md
README.md

apidGatewayConfDeploy

apidGatewayConfDeploy is a plugin for apid.

Gateways acting as clients will connect to apid; and this plugin will offer configuration updates that occur in the management. The plugin will also download the configuration data from GCS securely, and store it in the local filesystem. They can be fetched by the Gateway via API's as well.

Functional description

###Configurations

  • Gateway cant call “/configurations” to fetch configurations.
  • “type” filter is supported.
  • Long-polling is supported.
  • A configuration can be fetched by id “/configurations/{configId}”

###Blobs

  • A blob can be downloaded by id “/blobs/{blobId}”

For details, check the file apidGatewayConfDeploy-api.yaml.