fix: awsv4 signatures + http client
This commit is contained in:
parent
bdf9298496
commit
f47bdf7fd2
7 changed files with 36 additions and 16 deletions
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue