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

[LAOS] Add coroutine wrapper for Iroha2Client as reactive stream publisher #365

Open
appetrosyan opened this issue Jul 30, 2023 · 1 comment
Labels
enhancement New feature or request iroha2

Comments

@appetrosyan
Copy link

A suggestion arose to add a wrapper of the couroutines in jp.co.soramitsu.iroha2.Iroha2Client into the reactor and/or reactive stream publisher (whichever is easier, with preference for the publisher).

fun subscribeToBlocks(from: Long, count: Int): Flux<VersionedBlockMessage> {
    return subscribeToBlockStream(from, count).asFlux()
}

fun subscribeToBlocksAsPublisher(from: Long, count: Int): Publisher<VersionedBlockMessage> {
    return subscribeToBlockStream(from, count).asPublisher();
}
@appetrosyan appetrosyan added iroha2 enhancement New feature or request labels Jul 30, 2023
@Mingela
Copy link
Contributor

Mingela commented Aug 2, 2023

This should be done on a client side, we wouldn't want to bring massive framework dependencies into an SDK since it's up to a client to decide, we rely only on built-in mechanisms and lightweight libraries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request iroha2
Projects
None yet
Development

No branches or pull requests

2 participants