-
-
Notifications
You must be signed in to change notification settings - Fork 364
Open
Labels
runtimecontroller runtime relatedcontroller runtime relatedunstablefeature that unstable feature gatingfeature that unstable feature gating
Description
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.
- 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
- All writes on a store are handled through
-
Return a concrete type that implements
Streamfromreflector().- 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 awatcherstream 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)
- It would be good to try and change the type returned by a
-
Shared streams Controller interfaces for relations (watches_shared_stream and owns_shared_stream)
- We should extend
for_shared_streamin such a way that Controllers may accept shared streams for owned objects.
- We should extend
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
pando85
Metadata
Metadata
Assignees
Labels
runtimecontroller runtime relatedcontroller runtime relatedunstablefeature that unstable feature gatingfeature that unstable feature gating