Documentation
¶
Index ¶
- func CheckRestful(restfulMsgs []*RestfulMsg, restfulURL []string, logger *logging.Logger)
- func CheckService(logger *logging.Logger)
- func SyncDevice(logger *logging.Logger)
- func SyncDeviceLog(logMsgs []*LogMsg, logCodes []string, loggerD *logging.Logger, ca *cache.Cache)
- type FaultLog
- type FaultTxt
- type FileInfo
- type InterfaceLog
- type LogMsg
- type Plugin
- type RabbitMQ
- type RestfulMsg
- type RestfulResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRestful ¶
func CheckRestful(restfulMsgs []*RestfulMsg, restfulURL []string, logger *logging.Logger)
CheckRestful 接口监控
func SyncDevice ¶
Types ¶
type FaultLog ¶
type FaultLog struct {
AppType string `json:"appType"`
Call Plugin `json:"call"`
Face Plugin `json:"face"`
Interf Plugin `json:"interf"`
Iptv Plugin `json:"iptv"`
Mqtt Plugin `json:"mqtt"`
IsBackground bool `json:"isBackground"`
IsEmptyBed bool `json:"isEmptyBed"`
IsMainActivity bool `json:"isMainActivity"`
Timestamp string `json:"timestamp"`
}
fault.log 文件内容 bis:床旁 nws: 护士站主机 webapp:门旁
type FaultTxt ¶
type FaultTxt struct {
Reason string `json:"reason"`
Mqtt bool `json:"mqtt"`
Timestamp string `json:"timestamp"`
}
fault.txt 文件内容 nis : 护理大屏
type InterfaceLog ¶
type InterfaceLog struct {
Msg string `json:"msg"`
PostParamJson string `json:"postParamJson"`
PostParamType int `json:"postParamType"`
Remark string `json:"remark"`
RequestType int `json:"requestType"`
Timestamp string `json:"timestamp"`
Url string `json:"url"`
}
interface.log requestType为0表示get请求,为1表示post请求, postParamType为0表示post请求的参数为Map, postParamType为1表示post请求的参数为Json,code为-1表示返回体为空,code为-2表示JSON解析出错
type LogMsg ¶
type LogMsg struct {
DevIp string `json:"device_ip"` // 服务id
DevType int64 `json:"device_type_id"`
DirName string `json:"dir_name"` //系统类型,bis/nis/nws/webapp
DeviceCode string `json:"device_code"` //设备编码
FaultMsg string `json:"fault_msg"` //故障信息
StatusMsg string `json:"wechat_msg"` //状态信息
DeviceImg string `json:"device_img"` //设备截图
Status bool `json:"status"`
StatusType string `json:"status_type"` //故障类型,设备异常,插件异常,日志异常
InterfaceError int `json:"interface_error"`
Call string `json:"call"`
Face string `json:"face"`
Interf string `json:"interf"`
Iptv string `json:"iptv"`
Mqtt string `json:"mqtt"`
CallCode string `json:"call_code"`
FaceCode string `json:"face_code"`
InterfCode string `json:"interf_code"`
IptvCode string `json:"iptv_code"`
MqttCode string `json:"mqtt_code"`
IsBackground string `json:"is_background"`
IsEmptyBed string `json:"is_empty_bed"`
IsMainActivity string `json:"is_main_activity"`
Timestamp string `json:"timestamp"`
}
type RabbitMQ ¶
type RabbitMQ struct {
// 队列名称
QueueName string
// 交换机
Exchange string
// Key
Key string
// 连接信息
Mqurl string
// contains filtered or unexported fields
}
func NewRabbitMQ ¶
NewRabbitMQ 创建结构体实例
func NewRabbitMQSimple ¶
NewRabbitMQSimple 简单模式Step 1.创建简单模式下的RabbitMq实例
type RestfulMsg ¶
type RestfulResponse ¶
type RestfulResponse struct {
Status int64 `json:"code"`
Msg string `json:"message"`
Data interface{} `json:"data"`
}
RestfulResponse
Click to show internal directories.
Click to hide internal directories.