mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-27 06:58:13 +02:00
databroker: add support for putting multiple records (#3291)
* databroker: add support for putting multiple records * add OptimumPutRequestsFromRecords function * replace GetAll with SyncLatest * fix stream when there are no records
This commit is contained in:
parent
343fa43ed4
commit
f73c5c615f
28 changed files with 790 additions and 660 deletions
|
@ -56,11 +56,11 @@ func TestServerSync(t *testing.T) {
|
|||
|
||||
for i := 0; i < numRecords; i++ {
|
||||
res, err := c.Put(ctx, &databroker.PutRequest{
|
||||
Record: &databroker.Record{
|
||||
Records: []*databroker.Record{{
|
||||
Type: any.TypeUrl,
|
||||
Id: strconv.Itoa(i),
|
||||
Data: any,
|
||||
},
|
||||
}},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
serverVersion = res.GetServerVersion()
|
||||
|
@ -106,11 +106,11 @@ func BenchmarkSync(b *testing.B) {
|
|||
|
||||
for i := 0; i < numRecords; i++ {
|
||||
_, _ = c.Put(ctx, &databroker.PutRequest{
|
||||
Record: &databroker.Record{
|
||||
Records: []*databroker.Record{{
|
||||
Type: any.TypeUrl,
|
||||
Id: strconv.Itoa(i),
|
||||
Data: any,
|
||||
},
|
||||
}},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue