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

Shared valve switch #186

Open
harpocrates opened this issue Dec 11, 2020 · 1 comment
Open

Shared valve switch #186

harpocrates opened this issue Dec 11, 2020 · 1 comment

Comments

@harpocrates
Copy link
Contributor

Short description

Add a new shared valve, from which it would be possible to create any number of flows (with different types) all controlled by a shared switch.

Details

In Akka streams, there is a distinction between a shared and unique killswitch. A shared valve would be to a shared killswitch as a valve is to a unique killswitch. The API would lean into that analogy:

final class SharedValveSwitch private[stream] (val name: String) extends ValveSwitch {
  def flow[T]: Graph[FlowShape[T, T], SharedValveSwitch] = ...
}

object Valve {
  def shared(name: String): SharedValveSwitch = ...
  // ... and existing members
}
@ennru
Copy link
Member

ennru commented Dec 14, 2020

Yes, a more general variant of Valve may be useful.

Having that said, we haven't seen much demand for Valve and have no plans to promote it into the Akka Streams API.

That shouldn't stop you from proposing a solution to the shared valve support in this repo.

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

No branches or pull requests

2 participants