You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We added experimental support for shared stream interfaces in PR #1449. Although the change is code complete, it has some rough edges.
Improvements
Introduce a new type to do writes against the store.
All writes on a store are handled through Writer<K>. There are two different types of writers: those that are backed by a channel (and can distribute events to listeners) and those that are not. We should differentiate between these two different contracts by introducing an appropriate type for a "shared" writer. This will allow us to avoid awkward public interface, like the subscribe() method
Return a concrete type that implements Stream from reflector().
It would be good to try and change the type returned by a reflector(). Because a writer can now broadcast events to listeners, it has to call into an async function when a watcher stream is threaded through it. To keep it simple, we are using the stream! macro, but it tends to obfuscate the implementation. It would be nicer to deal with a concrete type here (which in turn might make subscribing easier)
Shared streams Controller interfaces for relations (watches_shared_stream and owns_shared_stream)
We should extend for_shared_stream in such a way that Controllers may accept shared streams for owned objects.
Parts of this have already been mentioned as future work in #1080.
Describe the solution you'd like
N/A
Describe alternatives you've considered
N/A
Documentation, Adoption, Migration Strategy
No response
Target crate for feature
kube-runtime
The text was updated successfully, but these errors were encountered:
Would you like to work on this feature?
yes
What problem are you trying to solve?
We added experimental support for shared stream interfaces in PR #1449. Although the change is code complete, it has some rough edges.
Improvements
Introduce a new type to do writes against the store.
Writer<K>
. There are two different types of writers: those that are backed by a channel (and can distribute events to listeners) and those that are not. We should differentiate between these two different contracts by introducing an appropriate type for a "shared" writer. This will allow us to avoid awkward public interface, like the subscribe() methodReturn a concrete type that implements
Stream
fromreflector()
.reflector()
. Because a writer can now broadcast events to listeners, it has to call into an async function when awatcher
stream is threaded through it. To keep it simple, we are using thestream!
macro, but it tends to obfuscate the implementation. It would be nicer to deal with a concrete type here (which in turn might make subscribing easier)Shared streams Controller interfaces for relations (watches_shared_stream and owns_shared_stream)
for_shared_stream
in such a way that Controllers may accept shared streams for owned objects.Parts of this have already been mentioned as future work in #1080.
Describe the solution you'd like
N/A
Describe alternatives you've considered
N/A
Documentation, Adoption, Migration Strategy
No response
Target crate for feature
kube-runtime
The text was updated successfully, but these errors were encountered: