Add SCUM Source RCON transport

This commit is contained in:
npc0-hue
2026-07-23 10:55:31 +08:00
parent ec96c22e4c
commit 742f96ea02
33 changed files with 1297 additions and 19 deletions
+33
View File
@@ -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
}