Clarify Postings.At() contract (#12921)

It's implicit, but should be explicit. It is invalid to call At() after
a failed call to Next() or Seek().

Following up on https://github.com/prometheus/prometheus/pull/12906

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
This commit is contained in:
Oleg Zaytsev 2023-10-09 16:15:06 +02:00 committed by GitHub
parent b787e5f190
commit 5bd8c8c561
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -413,6 +413,7 @@ type Postings interface {
Seek(v storage.SeriesRef) bool
// At returns the value at the current iterator position.
// At should only be called after a successful call to Next or Seek.
At() storage.SeriesRef
// Err returns the last error of the iterator.