Documentation ¶
Index ¶
- func FindAllReportLevels() []*shared.Definition
- func FindReportLevelName(level ReportLevel) string
- func FindTaskTypeName(taskType TaskType) string
- type CheckSystemdServiceMessage
- type ConnectedAPINodeMessage
- type GlobalSetting
- type IPTask
- type MessageCode
- type NewNodeTaskMessage
- type NodeConfig
- type ReportLevel
- type Status
- type TaskType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAllReportLevels ¶
func FindAllReportLevels() []*shared.Definition
func FindReportLevelName ¶
func FindReportLevelName(level ReportLevel) string
func FindTaskTypeName ¶
Types ¶
type CheckSystemdServiceMessage ¶
type CheckSystemdServiceMessage struct { }
CheckSystemdServiceMessage Systemd服务
type ConnectedAPINodeMessage ¶
type ConnectedAPINodeMessage struct {
APINodeId int64 `json:"apiNodeId"`
}
ConnectedAPINodeMessage 连接API节点成功
type GlobalSetting ¶
type GlobalSetting struct { MinNotifyConnectivity float64 `json:"minNotifyConnectivity"` // 需要通知的最小连通值 NotifyWebHookURL string `json:"notifyWebHookURL"` // WebHook通知地址 }
GlobalSetting 全局设置
func DefaultGlobalSetting ¶
func DefaultGlobalSetting() *GlobalSetting
type MessageCode ¶
type MessageCode = string
const ( MessageCodeConnectedAPINode MessageCode = "connectedAPINode" // 节点连接API节点成功 MessageCodeCheckSystemdService MessageCode = "checkSystemdService" // 检查Systemd服务 MessageCodeNewNodeTask MessageCode = "newNodeTask" // 有新的节点任务产生 )
节点相关消息
type NodeConfig ¶
type NodeConfig struct {
Id int64 `json:"id"`
}
func (*NodeConfig) Init ¶
func (this *NodeConfig) Init() error
type ReportLevel ¶
type ReportLevel = string
const ( ReportLevelGood ReportLevel = "good" ReportLevelNormal ReportLevel = "normal" ReportLevelBad ReportLevel = "bad" ReportLevelBroken ReportLevel = "broken" )
type Status ¶
type Status struct { IP string `json:"ip"` OS string `json:"os"` OSName string `json:"osName"` Username string `json:"username"` BuildVersion string `json:"buildVersion"` // 编译版本 BuildVersionCode uint32 `json:"buildVersionCode"` // 版本数字 UpdatedAt int64 `json:"updatedAt"` // 更新时间 Location string `json:"location"` // 从IP查询到的Location ISP string `json:"isp"` // 从IP查询到的ISP }
Click to show internal directories.
Click to hide internal directories.