fix: awsv4 signatures + http client

This commit is contained in:
Milas Bowman 2025-03-28 21:50:12 -04:00
parent bdf9298496
commit f47bdf7fd2
Signed by: milas
SSH key fingerprint: SHA256:ek2D5l1HA34B3wbdErz0QOXm1E46CVvyf/nM4Fwfx/U
7 changed files with 36 additions and 16 deletions

View file

@ -32,15 +32,14 @@ func ExampleScrollIndex() {
ctx := context.Background()
client := k2v.NewClient(k2v.EndpointFromEnv(), k2v.KeyFromEnv())
defer client.Close()
const bucket = "k2v-test"
pkPrefix := randomPk()
for i := range 5 {
_ = client.InsertItem(ctx, bucket, pkPrefix+"-"+strconv.Itoa(i), randomSk(), "", []byte("hello"))
_ = client.InsertItem(ctx, TestBucket, pkPrefix+"-"+strconv.Itoa(i), randomSk(), "", []byte("hello"))
}
var responses []*k2v.ReadIndexResponse
_ = k2v.ScrollIndex(ctx, client, bucket, k2v.ReadIndexQuery{Prefix: pkPrefix, Limit: 25}, func(resp *k2v.ReadIndexResponse) error {
_ = k2v.ScrollIndex(ctx, client, TestBucket, k2v.ReadIndexQuery{Prefix: pkPrefix, Limit: 25}, func(resp *k2v.ReadIndexResponse) error {
responses = append(responses, resp)
return nil
})