mirror of
https://github.com/siderolabs/talos.git
synced 2026-05-08 05:46:17 +02:00
Drop maintenance service and all the code supporting it directly. Instead, move all network API termination into the `apid` service, which now can work now in more modes to support maintenance operations as well. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
25 lines
545 B
Go
25 lines
545 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package apid
|
|
|
|
import (
|
|
"context"
|
|
"log"
|
|
|
|
"github.com/siderolabs/go-debug"
|
|
)
|
|
|
|
func runDebugServer(ctx context.Context) {
|
|
const debugAddr = ":9981"
|
|
|
|
debugLogFunc := func(msg string) {
|
|
log.Print(msg)
|
|
}
|
|
|
|
if err := debug.ListenAndServe(ctx, debugAddr, debugLogFunc); err != nil {
|
|
log.Fatalf("failed to start debug server: %s", err)
|
|
}
|
|
}
|