From f89f91f4ab84642250034f6988921361ae2bcf67 Mon Sep 17 00:00:00 2001 From: wangjian Date: Wed, 12 Oct 2022 11:57:42 +0800 Subject: [PATCH] init --- example/multi-mq/mock_ap/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/example/multi-mq/mock_ap/main.go b/example/multi-mq/mock_ap/main.go index 0bca70a..404e150 100644 --- a/example/multi-mq/mock_ap/main.go +++ b/example/multi-mq/mock_ap/main.go @@ -11,22 +11,22 @@ import ( func main() { // connect to HPDS-MQ. - source := hpds_node.NewAccessPoint( + ap := hpds_node.NewAccessPoint( "hpds-ap", hpds_node.WithMqAddr("localhost:27188"), hpds_node.WithCredential("token:z1"), ) - err := source.Connect() + err := ap.Connect() if err != nil { log.Printf("[AccessPoint] Emit the data to HPDS-MQ failure with err: %v", err) return } - defer source.Close() + defer ap.Close() - source.SetDataTag(0x33) + ap.SetDataTag(0x33) // generate mock data and send it to HPDS-MQ. - err = generateAndSendData(source) + err = generateAndSendData(ap) if err != nil { log.Printf("[AccessPoint] >>>> ERR >>>> %v", err) os.Exit(1)