mammoth-garden-53682
07/28/2022, 7:09 PMoptup/optdestroy.EventStreams
to stream changes to one or more clients. The events are dispatched as expected but when my operation completes the channel I provide is continuously spammed with events that have null values and no sequence. Marshaled event:
INFO[0028] { 'event': {"sequence":0,"timestamp":0,"Error":null} }
Is this…expected? Am I not able to use long-lived channels for for event streams? My code is fairly straightforward:
...
ctx := context.Background()
upResp, err := stack.Up(ctx, optup.EventStreams(ec))
...
// and in another goroutine
...
for {
select {
case <-sl.Done:
return
case e := <-<http://sl.ec|sl.ec>:
me, _ := json.Marshal(e)
log.Infof("{ 'event': %s }", me)
}
}