Documentation
¶
Index ¶
- Constants
- Variables
- func ExecuteCallback(successCount int)
- func GetCurrentTime() string
- func GetExecutablePath() string
- func Notify(request NotifyRequest) error
- func SendNotify(length int)
- func SetupSignalHandler(forceClose *atomic.Bool)
- func UpdateSubStore(yamlData []byte)
- func UpdateSubs()
- func WarpUrl(url string) string
- type NotifyRequest
- type Operator
Constants ¶
View Source
const ( SubName = "sub" MihomoName = "mihomo" )
Variables ¶
View Source
var BaseURL string
基础URL配置
Functions ¶
func GetCurrentTime ¶
func GetCurrentTime() string
func GetExecutablePath ¶
func GetExecutablePath() string
func SendNotify ¶
func SendNotify(length int)
func SetupSignalHandler ¶
SetupSignalHandler 设置信号处理 同时支持两种信号处理模式: - HUB 信号(SIGHUP): 只设置 check.ForceClose 为 true,不退出程序 - Ctrl+C 信号(SIGINT/SIGTERM): 第一次设置 ForceClose,第二次退出程序
func UpdateSubStore ¶
func UpdateSubStore(yamlData []byte)
func UpdateSubs ¶
func UpdateSubs()
Types ¶
type NotifyRequest ¶
type NotifyRequest struct { URLs string `json:"urls"` // 通知目标的 URL(如 mailto://、discord://) Body string `json:"body"` // 通知内容 Title string `json:"title"` // 通知标题(可选) }
NotifyRequest 定义发送通知的请求结构
Click to show internal directories.
Click to hide internal directories.