From 6410b21bc162fd5f9527bda7484828c53cd872d0 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 7 Nov 2024 16:01:00 +0100 Subject: pkg/manager: set more http fields before calling Serve Pools and ReproLoop and always created on start, so there is no need to support lazy set for them. It only complicates code and makes it harder to reason about. Also introduce vm.Dispatcher as an alias to dispatcher.Pool, as it's the only specialization we use in the project. --- vm/vm.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vm') diff --git a/vm/vm.go b/vm/vm.go index d2165a276..27e6f319e 100644 --- a/vm/vm.go +++ b/vm/vm.go @@ -332,7 +332,9 @@ func (inst *Instance) Close() error { return err } -func NewDispatcher(pool *Pool, def dispatcher.Runner[*Instance]) *dispatcher.Pool[*Instance] { +type Dispatcher = dispatcher.Pool[*Instance] + +func NewDispatcher(pool *Pool, def dispatcher.Runner[*Instance]) *Dispatcher { return dispatcher.NewPool(pool.Count(), pool.Create, def) } -- cgit mrf-deployment