Add Run control event stream
This commit is contained in:
@@ -2,6 +2,12 @@ package domain
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
RunControlEventTypeReady = "control.ready"
|
||||
RunControlEventTypeHeartbeat = "control.heartbeat"
|
||||
RunControlEventTypeJobChanged = "job.changed"
|
||||
)
|
||||
|
||||
type RunCapabilityReport struct {
|
||||
Capabilities []string
|
||||
Fingerprint string
|
||||
@@ -53,6 +59,20 @@ type RunControlHeartbeatResult struct {
|
||||
ServerTime time.Time
|
||||
}
|
||||
|
||||
type RunControlStreamRequest struct {
|
||||
RunEndpointID string
|
||||
SessionToken string
|
||||
LastEventSeq uint64
|
||||
}
|
||||
|
||||
type RunControlEvent struct {
|
||||
RunEndpointID string
|
||||
Sequence uint64
|
||||
Type string
|
||||
ServerTime time.Time
|
||||
RetrySeconds int
|
||||
}
|
||||
|
||||
type RunLifecycleReport struct {
|
||||
RunEndpointID string
|
||||
SessionToken string
|
||||
@@ -126,6 +146,14 @@ func CopyRunControlHeartbeatResult(result RunControlHeartbeatResult) RunControlH
|
||||
return result
|
||||
}
|
||||
|
||||
func CopyRunControlStreamRequest(request RunControlStreamRequest) RunControlStreamRequest {
|
||||
return request
|
||||
}
|
||||
|
||||
func CopyRunControlEvent(event RunControlEvent) RunControlEvent {
|
||||
return event
|
||||
}
|
||||
|
||||
func CopyRunLifecycleReport(report RunLifecycleReport) RunLifecycleReport {
|
||||
report.ExecutionResult.ServerDeploymentEvidence = CopyServerDeploymentEvidence(report.ExecutionResult.ServerDeploymentEvidence)
|
||||
report.ExecutionResult.DeploymentReceipt = CopyServerDeploymentExecutionReceipt(report.ExecutionResult.DeploymentReceipt)
|
||||
|
||||
Reference in New Issue
Block a user