onesvm-browser-server/server/internal/contract/jobopts.go
chii eb972dfa93 feat: 落地 browser-server 控制面并打通 mgr1 海外订阅
单二进制三角色 + Dock 适配器 + Swarm stack 达到可部署态;mgr1 实测订阅经 central-proxy bootstrap,探活 alive=41/52。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 15:05:12 +08:00

16 lines
871 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// jobopts.go:gateway→scheduler 内部契约扩展(不改 JobEnvelope 既有字段)。
//
// 背景:W2 gateway 需要在 enqueue 请求里携带单任务执行超时(read 默认 30s),
// 而 contract.JobEnvelope 线字段已由 W1 golden 测试锁定、本步禁止改动。
// 本文件以嵌入扩展方式追加可选字段:不识别该字段的旧实现按 JSON 未知字段
// 忽略,向后兼容;W3 scheduler 经本类型读取。
package contract
// JobEnvelopeExt JobEnvelope 的内部扩展信封(enqueue 请求体形状)。
// 嵌入保持 JobEnvelope 线格式逐字段不变,仅追加可选键。
type JobEnvelopeExt struct {
JobEnvelope
// TimeoutS 单任务执行超时秒数(scheduler 侧执行/租约上限参考;
// gateway 侧另有 120s 等待硬顶,两层独立)。
TimeoutS int `json:"timeout_s,omitempty"`
}