feat(platform): forward protected requests to run
This commit is contained in:
@@ -131,6 +131,7 @@ type GameClientBridgeCommand struct {
|
||||
ProfileKey string
|
||||
CommandType string
|
||||
Payload map[string]any
|
||||
RunJobID string
|
||||
IdempotencyKey string
|
||||
Priority int
|
||||
State GameClientBridgeCommandState
|
||||
|
||||
@@ -22,6 +22,7 @@ type RunJobAssignment struct {
|
||||
ExecutionInput JobExecutionInput
|
||||
LeaseToken string
|
||||
Attempt int
|
||||
FencingToken uint64
|
||||
MaxAttempts int
|
||||
AckDeadlineAt time.Time
|
||||
LeaseExpiresAt time.Time
|
||||
@@ -168,6 +169,32 @@ type SourceRCONExecutionInput struct {
|
||||
Command string
|
||||
}
|
||||
|
||||
// ProtectedRequestExecutionInput is returned exactly once to the active,
|
||||
// fenced Run lease. RequestText is never persisted in a job or bridge command.
|
||||
type ProtectedRequestExecutionInputRequest struct {
|
||||
RunEndpointID string
|
||||
SessionToken string
|
||||
JobID string
|
||||
LeaseToken string
|
||||
Attempt int
|
||||
FencingToken uint64
|
||||
}
|
||||
|
||||
type ProtectedRequestExecutionInput struct {
|
||||
JobID string
|
||||
ServerInstanceID string
|
||||
RunEndpointID string
|
||||
FencingToken uint64
|
||||
Authorized bool
|
||||
ApprovalState string
|
||||
QueueState string
|
||||
ExpiresAt time.Time
|
||||
Kind string
|
||||
TransportKey string
|
||||
TargetKey string
|
||||
RequestText string
|
||||
}
|
||||
|
||||
type RunUpdateInputRequest struct {
|
||||
RunEndpointID string
|
||||
SessionToken string
|
||||
@@ -355,6 +382,10 @@ func CopySourceRCONExecutionInput(input SourceRCONExecutionInput) SourceRCONExec
|
||||
return input
|
||||
}
|
||||
|
||||
func CopyProtectedRequestExecutionInput(input ProtectedRequestExecutionInput) ProtectedRequestExecutionInput {
|
||||
return input
|
||||
}
|
||||
|
||||
func CopyRunUpdateChunk(chunk RunUpdateChunk) RunUpdateChunk {
|
||||
chunk.Payload = append([]byte(nil), chunk.Payload...)
|
||||
return chunk
|
||||
|
||||
Reference in New Issue
Block a user