refactor: use nginx -s reload instead of systemd

- doc: add comment
This commit is contained in:
2026-08-17 10:10:14 +08:00
parent 79f18fcdea
commit f536987a7e
62 changed files with 2216 additions and 598 deletions
+11 -4
View File
@@ -2,16 +2,23 @@ package backendupdate
import "yms-daemon/internal/transaction"
// Progress is one live update event sent to the local CLI. It is observational
// only: delivery failure must not change the persisted update transaction.
// Progress 一次更新过程中的单条实时进度事件,用于回传给本地 CLI。
// 它仅用于观测反馈:即使投递失败也不得改变已持久化的更新事务状态。
type Progress struct {
// TransactionID 事件所属的事务标识。
TransactionID string
State transaction.State
Message string
// State 事件发生时的事务状态。
State transaction.State
// Message 面向用户的进度描述文本。
Message string
}
// ProgressReporter 进度事件回调,接收一次更新过程中的单条进度。
// 实现必须可安全地并发调用,且失败不应影响更新主流程。
type ProgressReporter func(Progress)
// operationLabel 根据输入类型返回本次操作的中文可读标签:重启类输入返回
// "restart",其余输入返回 "update"。该标签用于拼装进度与提交消息。
func operationLabel(inputType string) string {
if inputType == inputTypeCurrentRelease {
return "restart"