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
Currently we pull the ModuleContext once, but we really want some aspects of it to be dynamic, in particular secrets/config.
We'd need to change the Controller endpoint to be a streaming response, and use PG's pubsub support to notify the controllers of changes.
Turn GetModuleContext() into a streaming RPC - this will also need to retry the streaming RPC in case the stream dies - potentially just use RetryStreamingClientStream if it's suitable.
Block until the first ModuleContext arrives so the module has something to use.
Inside controller.Service.GetModuleContext, periodically reconstruct the ModuleContext, hash it, and check against the previous version. If it's changed, send it. ModuleContext needs to be deterministically hashable.
Add a new type to the modulecontext package that takes the gRPC client and refreshes an atomically (alecthomas/atomic.Value[T]) retrievable ModuleContext.
Instead of adding the ModuleContext directly to the context, we'll add this self-refreshing type.
Inside the go-runtime replace all direct uses of ModuleContext with this new type.
The text was updated successfully, but these errors were encountered:
Currently we pull the
ModuleContext
once, but we really want some aspects of it to be dynamic, in particular secrets/config.We'd need to change the Controller endpoint to be a streaming response, and use PG's pubsub support to notify the controllers of changes.
GetModuleContext()
into a streaming RPC - this will also need to retry the streaming RPC in case the stream dies - potentially just use RetryStreamingClientStream if it's suitable.ModuleContext
arrives so the module has something to use.controller.Service.GetModuleContext
, periodically reconstruct theModuleContext
, hash it, and check against the previous version. If it's changed, send it.ModuleContext
needs to be deterministically hashable.modulecontext
package that takes the gRPC client and refreshes an atomically (alecthomas/atomic.Value[T]
) retrievableModuleContext
.ModuleContext
directly to thecontext
, we'll add this self-refreshing type.go-runtime
replace all direct uses ofModuleContext
with this new type.The text was updated successfully, but these errors were encountered: