Files
p2p/internal/service/system.go
2025-10-30 17:58:49 +08:00

38 lines
948 B
Go
Raw 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.
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
)
type (
ISystem interface {
Init()
Update(ctx context.Context, gzFile string) (err error)
// RestartSelf 实现 Windows 平台下的程序自重启
RestartSelf() error
// RenameRunningFile 重命名正在运行的程序文件(如 message.exe → message.exe~
RenameRunningFile(exePath string) (string, error)
CheckUpdate() (err error)
}
)
var (
localSystem ISystem
)
func System() ISystem {
if localSystem == nil {
panic("implement not found for interface ISystem, forgot register?")
}
return localSystem
}
func RegisterSystem(i ISystem) {
localSystem = i
}