Add SCUM Source RCON transport
This commit is contained in:
@@ -149,6 +149,23 @@ type DependencyExecutionInput struct {
|
||||
Bindings map[string]string
|
||||
}
|
||||
|
||||
type SourceRCONExecutionInputRequest struct {
|
||||
RunEndpointID string
|
||||
SessionToken string
|
||||
JobID string
|
||||
LeaseToken string
|
||||
Attempt int
|
||||
}
|
||||
|
||||
// SourceRCONExecutionInput is sent only to the active signed Run lease. Its
|
||||
// Command value must never be persisted in a Job, assignment, or journal.
|
||||
type SourceRCONExecutionInput struct {
|
||||
JobID string
|
||||
ServerInstanceID string
|
||||
RunEndpointID string
|
||||
Command string
|
||||
}
|
||||
|
||||
type RunUpdateInputRequest struct {
|
||||
RunEndpointID string
|
||||
SessionToken string
|
||||
@@ -278,6 +295,7 @@ type RunJobReconcileResult struct {
|
||||
func CopyRunJobAssignment(assignment RunJobAssignment) RunJobAssignment {
|
||||
assignment.ExecutionInput.Inputs = CopyStringMap(assignment.ExecutionInput.Inputs)
|
||||
assignment.ExecutionInput.DLLExtensions = append([]RuntimeDLLExtensionPlan(nil), assignment.ExecutionInput.DLLExtensions...)
|
||||
assignment.ExecutionInput.SourceRCON = CopyRuntimeSourceRCONPlan(assignment.ExecutionInput.SourceRCON)
|
||||
return assignment
|
||||
}
|
||||
|
||||
@@ -331,6 +349,10 @@ func CopyDependencyExecutionInput(input DependencyExecutionInput) DependencyExec
|
||||
return input
|
||||
}
|
||||
|
||||
func CopySourceRCONExecutionInput(input SourceRCONExecutionInput) SourceRCONExecutionInput {
|
||||
return input
|
||||
}
|
||||
|
||||
func CopyRunUpdateChunk(chunk RunUpdateChunk) RunUpdateChunk {
|
||||
chunk.Payload = append([]byte(nil), chunk.Payload...)
|
||||
return chunk
|
||||
|
||||
@@ -112,6 +112,32 @@ type RemoteAdapterResult struct {
|
||||
CompletedAt time.Time
|
||||
}
|
||||
|
||||
type SourceRCONCommandKind string
|
||||
|
||||
const (
|
||||
SourceRCONCommandKindChat SourceRCONCommandKind = "chat"
|
||||
SourceRCONCommandKindCommand SourceRCONCommandKind = "command"
|
||||
)
|
||||
|
||||
// SourceRCONCommandRequest is intentionally transient: Command and Message
|
||||
// are consumed by the service broker and are never copied into a durable Job.
|
||||
type SourceRCONCommandRequest struct {
|
||||
ServerInstanceID string
|
||||
Kind SourceRCONCommandKind
|
||||
ChatType int
|
||||
Message string
|
||||
TargetSteamID string
|
||||
Command string
|
||||
IdempotencyKey string
|
||||
}
|
||||
|
||||
type SourceRCONCommandDispatch struct {
|
||||
JobID string
|
||||
ServerInstanceID string
|
||||
Status string
|
||||
Message string
|
||||
}
|
||||
|
||||
func CopyMetricSample(sample MetricSample) MetricSample {
|
||||
sample.PlayerCount = copyIntPtr(sample.PlayerCount)
|
||||
sample.MaxPlayers = copyIntPtr(sample.MaxPlayers)
|
||||
@@ -188,3 +214,10 @@ func CopyRemoteAdapterRequest(request RemoteAdapterRequest) RemoteAdapterRequest
|
||||
return request
|
||||
}
|
||||
func CopyRemoteAdapterResult(result RemoteAdapterResult) RemoteAdapterResult { return result }
|
||||
|
||||
func CopySourceRCONCommandRequest(request SourceRCONCommandRequest) SourceRCONCommandRequest {
|
||||
return request
|
||||
}
|
||||
func CopySourceRCONCommandDispatch(dispatch SourceRCONCommandDispatch) SourceRCONCommandDispatch {
|
||||
return dispatch
|
||||
}
|
||||
|
||||
@@ -490,6 +490,17 @@ type RuntimeDLLExtensionPlan struct {
|
||||
RCONPort int
|
||||
}
|
||||
|
||||
// RuntimeSourceRCONPlan is a frozen, secret-free loopback connection plan for
|
||||
// a ready SCUM UE4SS extension. The generated local config remains Run-owned.
|
||||
type RuntimeSourceRCONPlan struct {
|
||||
Protocol string
|
||||
ExtensionKey string
|
||||
ModKey string
|
||||
ConfigRef string
|
||||
DeploymentStateRef string
|
||||
Port int
|
||||
}
|
||||
|
||||
type RuntimeConfigTemplate struct {
|
||||
Key string
|
||||
TemplateRef string
|
||||
@@ -849,6 +860,7 @@ type JobExecutionInput struct {
|
||||
TargetVersion string
|
||||
Inputs map[string]string
|
||||
DLLExtensions []RuntimeDLLExtensionPlan
|
||||
SourceRCON *RuntimeSourceRCONPlan
|
||||
}
|
||||
|
||||
type JobExecutionResult struct {
|
||||
@@ -1570,9 +1582,18 @@ func CopyRunEndpoint(endpoint RunEndpoint) RunEndpoint {
|
||||
func CopyJob(job Job) Job {
|
||||
job.ExecutionInput.Inputs = CopyStringMap(job.ExecutionInput.Inputs)
|
||||
job.ExecutionInput.DLLExtensions = append([]RuntimeDLLExtensionPlan(nil), job.ExecutionInput.DLLExtensions...)
|
||||
job.ExecutionInput.SourceRCON = CopyRuntimeSourceRCONPlan(job.ExecutionInput.SourceRCON)
|
||||
return job
|
||||
}
|
||||
|
||||
func CopyRuntimeSourceRCONPlan(plan *RuntimeSourceRCONPlan) *RuntimeSourceRCONPlan {
|
||||
if plan == nil {
|
||||
return nil
|
||||
}
|
||||
copy := *plan
|
||||
return ©
|
||||
}
|
||||
|
||||
func CopyArtifact(artifact Artifact) Artifact {
|
||||
return artifact
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user