mirror of
https://github.com/siderolabs/talos.git
synced 2026-05-05 04:16:21 +02:00
Many small changes, memory reduction measured to be aroun -20MiB. Reduce cgroup memory limit. Changes: * limit updates to 2fps * batch log updates * reuse/maps slices to reduce allocations Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
25 lines
550 B
Go
25 lines
550 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 dashboard
|
|
|
|
import (
|
|
"context"
|
|
"log"
|
|
|
|
"github.com/siderolabs/go-debug"
|
|
)
|
|
|
|
func runDebugServer(ctx context.Context) {
|
|
const debugAddr = ":9984"
|
|
|
|
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)
|
|
}
|
|
}
|