From 3f95df780f0535585bc504fa935508a1a798c6c9 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Tue, 29 Apr 2025 17:06:20 -0400 Subject: [PATCH] enable snapshot streaming (#954) --- cmd/zrok/testCanaryPublicProxy.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cmd/zrok/testCanaryPublicProxy.go b/cmd/zrok/testCanaryPublicProxy.go index 1bf57b69..5c144396 100644 --- a/cmd/zrok/testCanaryPublicProxy.go +++ b/cmd/zrok/testCanaryPublicProxy.go @@ -70,7 +70,7 @@ func (cmd *testCanaryPublicProxy) run(_ *cobra.Command, _ []string) { logrus.Fatal("unable to load environment; did you 'zrok enable'?") } - var sc *canary.SnapshotCollector + var sc *canary.SnapshotStreamer var scCtx context.Context var scCancel context.CancelFunc if cmd.canaryConfig != "" { @@ -79,7 +79,10 @@ func (cmd *testCanaryPublicProxy) run(_ *cobra.Command, _ []string) { panic(err) } scCtx, scCancel = context.WithCancel(context.Background()) - sc = canary.NewSnapshotCollector(scCtx, cfg) + sc, err = canary.NewSnapshotStreamer(scCtx, cfg) + if err != nil { + panic(err) + } go sc.Run() } @@ -127,9 +130,9 @@ func (cmd *testCanaryPublicProxy) run(_ *cobra.Command, _ []string) { if sc != nil { scCancel() <-sc.Closed - if err := sc.Store(); err != nil { - panic(err) - } + //if err := sc.Store(); err != nil { + // panic(err) + //} } results := make([]*canary.LooperResults, 0)