Skip to content
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

Merged
merged 4 commits into from
Nov 4, 2021

Conversation

anatolysergeev
Copy link
Collaborator

No description provided.

@anatolysergeev anatolysergeev requested a review from a team as a code owner November 3, 2021 19:33
@@ -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]])
Copy link
Collaborator Author

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((

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StreamChunk now

Copy link
Member

@mijicd mijicd left a 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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
StreamEntry(id = eId, entry)
StreamEntry(eId, entry)

I'd also rename it to entryId.

@mijicd mijicd merged commit 3dc8dc4 into zio:master Nov 4, 2021
@anatolysergeev anatolysergeev deleted the unify-stream-output-approaches branch November 5, 2021 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants