From 59ac3141ef3e9eb741c2927a7adfd3cb52b21741 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期二, 31 八月 2021 15:03:39 +0800
Subject: [PATCH] use fjt c_bhomebus
---
logc.go | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/logc.go b/logc.go
index e3f36f5..7ae7c50 100644
--- a/logc.go
+++ b/logc.go
@@ -1,8 +1,7 @@
package logc
import (
- "basic.com/valib/bhomebus.git"
- "encoding/json"
+ "basic.com/valib/c_bhomebus.git/proto/source/bhome_msg"
"fmt"
"sync"
"time"
@@ -45,7 +44,7 @@
}
type LogRegister struct {
- Nodes []bhomebus.NetNode
+ Nodes []bhome_msg.BHAddress
Topic string
Payload []byte
}
@@ -94,7 +93,7 @@
}
if msg == "" {
- retrun
+ return
}
log := &ScheduleLog{
@@ -109,7 +108,11 @@
deliverLog(log, timeout)
}
-func deliverLog(l LogPrinter, timeout time.Duration) {
+func SaveRuleServerLog(ruleServerPushLog RuleServerPushLog, timeout time.Duration) {
+ deliverLog(&ruleServerPushLog, timeout)
+}
+
+func deliverLog(l LogPrinter, timeout time.Duration) {
select {
case logCh <- l:
return
@@ -163,6 +166,7 @@
const (
OperationLogTopic = "operationLogSaveTopic"
ScheduleLogTopic = "scheduleLogSaveTopic"
+ RuleServerLogTopic = "ruleServerLogSaveTopic"
)
func saveLoop(logCallback LogReportCallback, wg *sync.WaitGroup, done chan struct{}) {
@@ -181,8 +185,8 @@
if err != nil {
logger.Error("failed to Marshal", log)
} else {
- var nodes []bhomebus.NetNode
- nodes = append(nodes, bhomebus.NetNode{})
+ var nodes []bhome_msg.BHAddress
+ nodes = append(nodes, bhome_msg.BHAddress{})
reg := &LogRegister {
nodes,
--
Gitblit v1.8.0