feat: 节点互联双向同步——授权/计划/客户(邮箱)按业务键LWW增量同步,HTTPS+HMAC互联密钥,默认10分钟宽松节奏
This commit is contained in:
1 parent
06a9dac99b
commit
44387835e1
13 files changed
+1180
-1
No files matched your search
@@ -36,6 +36,7 @@ type Config struct {
|
||||
ActivateDailyLimit int // 单序列号 24 小时内新设备激活上限(0 = 不限制)
|
||||
OnlineTTLMinutes int // 激活记录在线状态有效期(last_seen 超过即视为离线)
|
||||
DeactivateRequireToken bool // 解绑是否强制校验设备激活令牌
|
||||
SyncIntervalMinutes int // 节点双向同步间隔(分钟),宽松节奏默认 10
|
||||
|
||||
// CORS 配置
|
||||
CORSOrigins []string
|
||||
@@ -63,6 +64,7 @@ func Load() *Config {
|
||||
ActivateDailyLimit: getEnvInt("ACTIVATE_DAILY_LIMIT", 5),
|
||||
OnlineTTLMinutes: getEnvInt("ONLINE_TTL_MINUTES", 11520), // 默认 8 天,适配周检节奏
|
||||
DeactivateRequireToken: getEnvBool("DEACTIVATE_REQUIRE_TOKEN", true),
|
||||
SyncIntervalMinutes: getEnvInt("SYNC_INTERVAL_MINUTES", 10),
|
||||
CORSOrigins: defaultCORSOrigins(),
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user