From 65a4bc5bf1ff1ca4db8f8729d8413b284ea4796a Mon Sep 17 00:00:00 2001 From: Al Cutter Date: Thu, 25 Jul 2024 18:05:58 +0100 Subject: [PATCH] Set WithBatching option in example-gcp --- cmd/example-gcp/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/example-gcp/main.go b/cmd/example-gcp/main.go index dba7fe14..4bf75f55 100644 --- a/cmd/example-gcp/main.go +++ b/cmd/example-gcp/main.go @@ -25,6 +25,7 @@ import ( "net/http" "os" "strings" + "time" tessera "github.com/transparency-dev/trillian-tessera" "github.com/transparency-dev/trillian-tessera/storage/gcp" @@ -50,7 +51,10 @@ func main() { Bucket: *bucket, Spanner: *spanner, } - storage, err := gcp.New(ctx, gcpCfg, tessera.WithCheckpointSignerVerifier(signerFromFlags(), nil)) + storage, err := gcp.New(ctx, gcpCfg, + tessera.WithCheckpointSignerVerifier(signerFromFlags(), nil), + tessera.WithBatching(1024, time.Second), + ) if err != nil { klog.Exitf("Failed to create new GCP storage: %v", err) }