Closed brandur closed 2 months ago
Hm, I think this one may have snowballed too much.
@bgentry Okay I ended up reverting the behavior changes that I mentioned in comments above. I still did have to tweak how Stopped
work in BaseStartStop
so I could accurately test the new StartAll
, but I put in an escape hatch so that river.Client
's Stopped
could behave identically to how it did before. Mind taking a look?
Thx.
Add a
StartAll
helper that starts a number of services at once, also taking care that in the event of a problem, any services that had started are once stopped. I found the use of something like this convenient while trying some service code in River UI.I also make a couple tweaks so that the
Stopped
channel becomes a little safer to use. LikeStarted
, it will preallocate itself if called before a service is started. It's still not safe to call while stopping or after a stop, but its ergonomics still measurably improve.Lastly, I pull a somewhat unrelated change to add a
NewArchetype
function in for easily creating an archetype in non-test environments. Also found this useful when bringing use of archetypes into River UI.