With k8s correctly handle disabled auto-scale up case (#495)

This commit is contained in:
Geoff Bourne
2025-12-21 09:24:32 -06:00
committed by GitHub
parent 4fbaa59e3c
commit 19d56161f5
2 changed files with 16 additions and 7 deletions
+12
View File
@@ -15,6 +15,18 @@ type WakerFunc func(ctx context.Context) (string, error)
// SleeperFunc is a function that puts a server to sleep.
type SleeperFunc func(ctx context.Context) error
func buildWakerFromSleeper(endpoint string, sleeper SleeperFunc) WakerFunc {
if sleeper == nil {
return nil
}
return func(ctx context.Context) (string, error) {
if err := sleeper(ctx); err != nil {
return "", err
}
return endpoint, nil
}
}
var tcpShieldPattern = regexp.MustCompile("///.*")
// RouteFinder implementations find new routes in the system that can be tracked by a RoutesHandler