Stream live server logs over SSE

This commit is contained in:
npc0-hue
2026-08-03 22:28:54 +08:00
parent 5d4fca14f9
commit 7eac1926dd
48 changed files with 1526 additions and 263 deletions
+19
View File
@@ -1109,6 +1109,8 @@ type JobExecutionInput struct {
LifecycleOperation string
TargetVersion string
Inputs map[string]string
LogSource *RuntimeLogSource
LogSources []RuntimeLogSource
DLLExtensions []RuntimeDLLExtensionPlan
SourceRCON *RuntimeSourceRCONPlan
Deployment *ServerDeploymentDefinition
@@ -1988,6 +1990,8 @@ func CopyRunEndpoint(endpoint RunEndpoint) RunEndpoint {
func CopyJob(job Job) Job {
job.ExecutionInput.Inputs = CopyStringMap(job.ExecutionInput.Inputs)
job.ExecutionInput.LogSource = CopyRuntimeLogSourcePtr(job.ExecutionInput.LogSource)
job.ExecutionInput.LogSources = CopyRuntimeLogSources(job.ExecutionInput.LogSources)
job.ExecutionInput.DLLExtensions = append([]RuntimeDLLExtensionPlan(nil), job.ExecutionInput.DLLExtensions...)
job.ExecutionInput.SourceRCON = CopyRuntimeSourceRCONPlan(job.ExecutionInput.SourceRCON)
job.ExecutionInput.ServerDeploymentPlan = CopyServerDeploymentPlan(job.ExecutionInput.ServerDeploymentPlan)
@@ -2000,6 +2004,21 @@ func CopyJob(job Job) Job {
return job
}
func CopyRuntimeLogSourcePtr(source *RuntimeLogSource) *RuntimeLogSource {
if source == nil {
return nil
}
copy := *source
return &copy
}
func CopyRuntimeLogSources(sources []RuntimeLogSource) []RuntimeLogSource {
if sources == nil {
return nil
}
return append([]RuntimeLogSource(nil), sources...)
}
func CopyRuntimeSourceRCONPlan(plan *RuntimeSourceRCONPlan) *RuntimeSourceRCONPlan {
if plan == nil {
return nil