| | |
| | | |
| | | import ( |
| | | "basic.com/valib/bhomebus.git" |
| | | "basic.com/valib/bhshmq.git/proto/source/bhome_msg" |
| | | "fmt" |
| | | "sync" |
| | | "time" |
| | |
| | | } |
| | | |
| | | type LogRegister struct { |
| | | Nodes []bhomebus.NetNode |
| | | Nodes []bhome_msg.BHAddress |
| | | Topic string |
| | | Payload []byte |
| | | } |
| | |
| | | deliverLog(log, timeout) |
| | | } |
| | | |
| | | func deliverLog(l LogPrinter, timeout time.Duration) { |
| | | func deliverLog(l LogPrinter, timeout time.Duration) { |
| | | select { |
| | | case logCh <- l: |
| | | return |
| | |
| | | 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, |