reporterconfigs

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2022 License: BSD-3-Clause Imports: 1 Imported by: 1

Documentation

Index

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

func FindTaskTypeName(taskType TaskType) string

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 IPTask

type IPTask struct {
	AddrId int64  `json:"addrId"`
	IP     string `json:"ip"`
	Port   int    `json:"port"`
}

type MessageCode

type MessageCode = string
const (
	MessageCodeConnectedAPINode    MessageCode = "connectedAPINode"    // 节点连接API节点成功
	MessageCodeCheckSystemdService MessageCode = "checkSystemdService" // 检查Systemd服务
	MessageCodeNewNodeTask         MessageCode = "newNodeTask"         // 有新的节点任务产生
)

节点相关消息

type NewNodeTaskMessage

type NewNodeTaskMessage struct {
}

NewNodeTaskMessage 有新的节点任务

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
}

type TaskType

type TaskType = string
const (
	TaskTypeIPAddr TaskType = "ipAddr"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL