feat: add PollRange

This commit is contained in:
Milas Bowman 2025-03-10 22:29:53 -04:00
parent 6eb7e62a0c
commit 94bff8e8b7
Signed by: milas
SSH key fingerprint: SHA256:ek2D5l1HA34B3wbdErz0QOXm1E46CVvyf/nM4Fwfx/U
3 changed files with 164 additions and 0 deletions

View file

@ -33,6 +33,7 @@ type Client
func (c *Client) InsertBatch(ctx context.Context, b Bucket, items []BatchInsertItem) error
func (c *Client) InsertItem(ctx context.Context, b Bucket, pk string, sk string, ct CausalityToken, item []byte) error
func (c *Client) PollItem(ctx context.Context, b Bucket, pk string, sk string, ct CausalityToken, timeout time.Duration) (Item, CausalityToken, error)
func (c *Client) PollRange(ctx context.Context, b Bucket, pk string, q PollRangeQuery, timeout time.Duration) (*PollRangeResponse, error)
func (c *Client) ReadBatch(ctx context.Context, b Bucket, q []ReadBatchSearch) ([]BatchSearchResult, error)
func (c *Client) ReadIndex(ctx context.Context, b Bucket, q ReadIndexQuery) (*ReadIndexResponse, error)
func (c *Client) ReadItemMulti(ctx context.Context, b Bucket, pk string, sk string) ([]Item, CausalityToken, error)
@ -63,6 +64,8 @@ This will repeatedly make calls to **ReadBatch** (batch search), using `nextStar
See `ScrollIndex(ctx context.Context, client IndexScroller, b Bucket, query ReadIndexQuery, fn ReadIndexResponseHandler) error` for the equivalent for batch index reads.
No helper is available for `PollRange()` yet.
## Integration Tests
```shell
K2V_ENDPOINT="http://[::1]:3904" \