Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(logadmin): use consistent filter in paging example (#8221)
Without supplying a `timestamp` in the `ListLogEntries.Filter`, the client by default sets one for the last twenty-four hours when the `EntryIterator` is created. Since this example creates a new `EntryIterator` on each request, a new `timestamp` of a slightly different twenty-four hour window is added. When the `Next Page` button is pressed, it reuses the `NextPageToken` from the previous call, but that was created for a different twenty-four hour window `Filter`. This creates a mismatch between the requested `Filter` and the `Filter` used to create the `NextPageToken`, resulting in an error. To address this, we create the filter in the main function before server start up. In this filter, we set a timestamp **explicitly**. Note: I made this a `fix` commit because this is part of the GoDoc examples and we need this to appear as the latest release, otherwise no one will see it until another release comes along. Fixes #8186.
- Loading branch information