Move the SRS proxy server code from the standalone repository https://github.com/ossrs/proxy into the proxy/ directory of the main SRS repo. Also update build instructions in origin-cluster.md.
22 lines
388 B
Go
22 lines
388 B
Go
// Copyright (c) 2025 Winlin
|
|
//
|
|
// SPDX-License-Identifier: MIT
|
|
package debug
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
|
|
"proxy/internal/env"
|
|
"proxy/internal/logger"
|
|
)
|
|
|
|
func HandleGoPprof(ctx context.Context, environment env.Environment) {
|
|
if addr := environment.GoPprof(); addr != "" {
|
|
go func() {
|
|
logger.Df(ctx, "Start Go pprof at %v", addr)
|
|
http.ListenAndServe(addr, nil)
|
|
}()
|
|
}
|
|
}
|