Rebased from main: Old CPU / Old docker version compatibility

This commit is contained in:
yusing
2026-01-16 21:27:37 +08:00
parent 2d0058aebc
commit d73272b8e0
61 changed files with 277 additions and 268 deletions

View File

@@ -7,7 +7,6 @@ import (
"strconv"
"time"
"github.com/bytedance/sonic"
"github.com/yusing/goutils/task"
)
@@ -162,7 +161,7 @@ func (s HealthStatus) MarshalJSON() ([]byte, error) {
func (s *HealthStatus) UnmarshalJSON(data []byte) error {
var v string
if err := sonic.Unmarshal(data, &v); err != nil {
if err := json.Unmarshal(data, &v); err != nil {
return fmt.Errorf("failed to unmarshal health status: %w", err)
}
@@ -178,7 +177,7 @@ func (jsonRepr *HealthJSONRepr) MarshalJSON() ([]byte, error) {
if url == "http://:0" {
url = ""
}
return sonic.Marshal(HealthJSON{
return json.Marshal(HealthJSON{
Name: jsonRepr.Name,
Config: jsonRepr.Config,
Started: jsonRepr.Started.Unix(),