Add persistent Run control stream
This commit is contained in:
@@ -2,6 +2,12 @@ package protocol
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
RunControlEventTypeReady = "control.ready"
|
||||
RunControlEventTypeHeartbeat = "control.heartbeat"
|
||||
RunControlEventTypeJobChanged = "job.changed"
|
||||
)
|
||||
|
||||
type RunCapacityReport struct {
|
||||
MaxJobs int `json:"maxJobs"`
|
||||
RunningJobs int `json:"runningJobs"`
|
||||
@@ -60,6 +66,20 @@ type RunHeartbeatResponse struct {
|
||||
ServerTime time.Time `json:"serverTime"`
|
||||
}
|
||||
|
||||
type RunControlStreamRequest struct {
|
||||
RunEndpointID string `json:"runEndpointId"`
|
||||
SessionToken string `json:"sessionToken"`
|
||||
LastEventSeq uint64 `json:"lastEventSeq,omitempty"`
|
||||
}
|
||||
|
||||
type RunControlEvent struct {
|
||||
RunEndpointID string `json:"runEndpointId"`
|
||||
Sequence uint64 `json:"sequence"`
|
||||
Type string `json:"type"`
|
||||
ServerTime time.Time `json:"serverTime"`
|
||||
RetrySeconds int `json:"retrySeconds,omitempty"`
|
||||
}
|
||||
|
||||
type RunLifecycleReportRequest struct {
|
||||
RunEndpointID string `json:"runEndpointId"`
|
||||
SessionToken string `json:"sessionToken"`
|
||||
|
||||
Reference in New Issue
Block a user