I have a situation where I am using `optup/optdest...
# automation-api
m
I have a situation where I am using
optup/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:
Copy code
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:
Copy code
...
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)
		}
	}
so it does appear that the channel is closed after update.