Add run lifecycle report projection
This commit is contained in:
@@ -53,6 +53,26 @@ type RunControlHeartbeatResult struct {
|
||||
ServerTime time.Time
|
||||
}
|
||||
|
||||
type RunLifecycleReport struct {
|
||||
RunEndpointID string
|
||||
SessionToken string
|
||||
ServerInstanceID string
|
||||
Capability string
|
||||
State JobState
|
||||
Progress RunJobProgressReport
|
||||
Message string
|
||||
ErrorCode string
|
||||
ExecutionResult JobExecutionResult
|
||||
}
|
||||
|
||||
type RunLifecycleReportResult struct {
|
||||
Accepted bool
|
||||
RunEndpointID string
|
||||
ServerInstanceID string
|
||||
ProjectedState ServerInstanceState
|
||||
ServerTime time.Time
|
||||
}
|
||||
|
||||
type RunControlSession struct {
|
||||
RunEndpointID string
|
||||
SessionToken string `json:"-"`
|
||||
@@ -103,6 +123,16 @@ func CopyRunControlHeartbeatResult(result RunControlHeartbeatResult) RunControlH
|
||||
return result
|
||||
}
|
||||
|
||||
func CopyRunLifecycleReport(report RunLifecycleReport) RunLifecycleReport {
|
||||
report.ExecutionResult.ServerDeploymentEvidence = CopyServerDeploymentEvidence(report.ExecutionResult.ServerDeploymentEvidence)
|
||||
report.ExecutionResult.DeploymentReceipt = CopyServerDeploymentExecutionReceipt(report.ExecutionResult.DeploymentReceipt)
|
||||
return report
|
||||
}
|
||||
|
||||
func CopyRunLifecycleReportResult(result RunLifecycleReportResult) RunLifecycleReportResult {
|
||||
return result
|
||||
}
|
||||
|
||||
func CopyRunControlSession(session RunControlSession) RunControlSession {
|
||||
session.UsedNonces = CopyStringSlice(session.UsedNonces)
|
||||
return session
|
||||
|
||||
Reference in New Issue
Block a user