Test event stream

This commit is contained in:
9seconds
2021-03-16 14:54:17 +03:00
parent e009d05a90
commit 7617aeadda
5 changed files with 130 additions and 8 deletions
+3 -5
View File
@@ -18,12 +18,10 @@ type eventStream struct {
func (e eventStream) Send(ctx context.Context, evt mtglib.Event) {
var chanNo uint32
streamID := evt.StreamID()
if streamID == "" {
chanNo = rand.Uint32()
} else {
if streamID := evt.StreamID(); streamID != "" {
chanNo = xxhash.ChecksumString32(streamID)
} else {
chanNo = rand.Uint32()
}
select {