-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Copyright (C) 2023 wwhai | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Affero General Public License as | ||
// published by the Free Software Foundation, either version 3 of the | ||
// License, or (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
package softwatchdog | ||
|
||
import ( | ||
"github.com/hootrhino/rulex/typex" | ||
"gopkg.in/ini.v1" | ||
) | ||
|
||
/* | ||
* | ||
* 软件看门狗 | ||
* | ||
*/ | ||
type softWatchDog struct { | ||
uuid string | ||
} | ||
|
||
func NewSoftWatchDog() *softWatchDog { | ||
return &softWatchDog{ | ||
uuid: "SOFT_WATCHDOG", | ||
} | ||
} | ||
|
||
func (dog *softWatchDog) Init(config *ini.Section) error { | ||
return nil | ||
} | ||
|
||
func (dog *softWatchDog) Start(typex.RuleX) error { | ||
return nil | ||
} | ||
func (dog *softWatchDog) Stop() error { | ||
return nil | ||
} | ||
|
||
func (hh *softWatchDog) PluginMetaInfo() typex.XPluginMetaInfo { | ||
return typex.XPluginMetaInfo{ | ||
UUID: hh.uuid, | ||
Name: "Soft WatchDog", | ||
Version: "v0.0.1", | ||
Homepage: "https://hootrhino.github.io", | ||
HelpLink: "https://hootrhino.github.io", | ||
Author: "wwhai", | ||
Email: "[email protected]", | ||
License: "MIT", | ||
} | ||
} | ||
|
||
/* | ||
* | ||
* 服务调用接口 | ||
* | ||
*/ | ||
func (cs *softWatchDog) Service(arg typex.ServiceArg) typex.ServiceResult { | ||
return typex.ServiceResult{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- | ||
Copyright (C) 2023 wwhai | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as | ||
published by the Free Software Foundation, either version 3 of the | ||
License, or (at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
|
||
# 软件看门狗 | ||
软件看门狗(Software Watchdog)用于监视应用程序或系统的运行状态,并在检测到问题时采取预定的操作。这有助于确保系统或应用程序在异常情况下能够自动恢复或采取适当的措施,以防止系统崩溃或无响应。 |