This series of commits culminates in the vspd code being moved to an internal package. Along the way it decouples the webapi package from vspd code, and moves both the webapi and vspd components to a new pattern for starting/stopping subsystems, namely:
var wg sync.WaitGroup
wg.Add(1)
go func() {
foo_that_blocks_until_ctx_done(ctx)
wg.Done()
}()
...
wg.Wait()
This is desirable because it is concise and easy to understand. Adding to and removing from waitgroups all in one place is a good practise to be following.
Requires #434
This series of commits culminates in the vspd code being moved to an internal package. Along the way it decouples the webapi package from vspd code, and moves both the webapi and vspd components to a new pattern for starting/stopping subsystems, namely:
This is desirable because it is concise and easy to understand. Adding to and removing from waitgroups all in one place is a good practise to be following.