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
That would be nice. I will flag this as an enhancement that anyone can pickup and PR the library. I'm curious: why do you have to update the timeout on a running circuit?
Is due to the logic of the framework I'm writing.
First I instantiate all the gRPC clients using Breaks.
The you can specify options for each client.
Thus you have (just an example):
// Instantiate the app and load the gRPC clientsconstapp=Framework({proto_file: services.proto})// Define specific gRPC call optionsapp.remote("Service.method",{cache: true,timeout: 100,fallback: ()=>"Opss"})
Thus first I create breakes, then I define options.
In my code I need to update options for a brake already instantiated (to be more specific I need to update the
timeout
value).I'm using Brakes internals to do that:
brake._masterCircuit._opts = Object.assign( {}, brake._masterCircuit._opts, newOptions );
Could be a nice to have an
updateOptions(opts)
method attached tobrake
instance to have the same result without touching internals.The text was updated successfully, but these errors were encountered: