-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unify stream output approaches #473
unify stream output approaches #473
Conversation
@@ -59,6 +59,8 @@ trait Streams { | |||
|
|||
sealed case class StreamEntry[I, K, V](id: I, fields: Map[K, V]) | |||
|
|||
sealed case class Stream[N, I, K, V](name: N, entries: Chunk[StreamEntry[I, K, V]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class name is arguable. I accept proposals for better))
It has conflict wit zio.stream.Stream, I have to fix imports((
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StreamChunk now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super small remark from my side, other than that good to go!
case RespValue.Array(Seq(id @ RespValue.BulkString(_), value)) => | ||
val eId = ArbitraryOutput[I]().unsafeDecode(id) | ||
val entry = KeyValueOutput(ArbitraryOutput[K](), ArbitraryOutput[V]()).unsafeDecode(value) | ||
StreamEntry(id = eId, entry) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StreamEntry(id = eId, entry) | |
StreamEntry(eId, entry) |
I'd also rename it to entryId
.
No description provided.