kvm2: health checker on dedicated connections; kvm2 in the ProviderHealth type comment

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-16 19:26:51 +00:00
co-authored by Claude Fable 5.1
parent 794a2aef3d
commit ce62fe57f6
6 changed files with 794 additions and 3 deletions
+6
View File
@@ -4,6 +4,7 @@ import (
"context"
"errors"
"strings"
"sync"
"testing"
"time"
@@ -13,9 +14,14 @@ import (
"gitea.home.hrajfrisbee.cz/kacerr/egress-proxies-operator/internal/provider"
)
// captureContext collects funcr output at V(2). The sink is locked because
// Check logs from one goroutine per host.
func captureContext() (context.Context, *[]string) {
lines := &[]string{}
var mu sync.Mutex
log := funcr.New(func(prefix, args string) {
mu.Lock()
defer mu.Unlock()
*lines = append(*lines, prefix+" "+args)
}, funcr.Options{Verbosity: 2})
return logf.IntoContext(context.Background(), log), lines