appcelerator-archive / amp

** THIS PROJECT IS STOPPED ** An open source CaaS for Docker, batteries included.
http://appcelerator.io
Apache License 2.0
81 stars 28 forks source link

Adding pagination to the logs API #1762

Closed bquenin closed 7 years ago

bquenin commented 7 years ago

This PR adds pagination support to the logs API. The underlying implementation relies on ES SearchAfter feature described here: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-after.html

The Get method in the log API now supports a from parameter. This parameter can be set based on a previous reply from the API. Indeed, each log entry now returns a FromID field which can be used as a starting point for subsequent queries.

How to test

Check Travis build. Integration tests have been updated accordingly in tests/integration/logs/logs_test.go.