feat: 完整游戏运维功能

This commit is contained in:
npc0-hue
2026-07-18 09:04:01 +08:00
parent f3b14b7945
commit 48b8ad8d6c
187 changed files with 16607 additions and 1140 deletions
+14
View File
@@ -13,6 +13,20 @@ func ValidateRunControlHello(hello domain.RunControlHello) error {
violations = appendRequired(violations, "runEndpointId", hello.RunEndpointID)
violations = appendRequired(violations, "displayName", hello.DisplayName)
violations = appendRequired(violations, "version", hello.Version)
if hello.Architecture != "" {
if !validDistributionTargetOS(hello.Platform) {
violations = append(violations, "platform is invalid")
}
if !validDistributionTargetArch(hello.Architecture) {
violations = append(violations, "architecture is invalid")
}
}
if (hello.UpdateJobID == "") != (hello.UpdateOutcome == "") {
violations = append(violations, "updateJobId and updateOutcome must be provided together")
}
if hello.UpdateOutcome != "" && hello.UpdateOutcome != "succeeded" && hello.UpdateOutcome != "rolled-back" {
violations = append(violations, "updateOutcome is invalid")
}
violations = appendRequired(violations, "capabilityReport.fingerprint", hello.CapabilityReport.Fingerprint)
if hello.ServerInstanceID != "" || hello.PluginID != "" || hello.ComponentKind != "" || hello.ComponentKey != "" || hello.KeyGeneration != 0 {
violations = appendRequired(violations, "serverInstanceId", hello.ServerInstanceID)