From 8ad5f373ec2caac18a20f0eaf23fbec644be9823 Mon Sep 17 00:00:00 2001 From: Nick Xia Date: Thu, 17 Sep 2020 11:23:32 +0800 Subject: [PATCH] Update README.md update Auth Cloud Config --- README.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 66d415f..9f59825 100644 --- a/README.md +++ b/README.md @@ -131,16 +131,11 @@ for reader.HasNext() { ``` Auth Cloud Config: ```go -authParams := make(map[string]string) -authParams["secretId"] = "AKxxxxxxxxxxCx" -authParams["secretKey"] = "SDxxxxxxxxxxCb" -authParams["region"] = "ap-guangzhou" -authParams["ownerUin"] = "xxxxxxxxxx" -authParams["uin"] = "xxxxxxxxxx" -client, err := pulsar.NewClient(pulsar.ClientOptions{ - URL: "pulsar://9.xx.xx.8:6650", - AuthCloud: pulsar.NewAuthenticationCloudCam(authParams), //在这里配置CAM认证 -}) +client, err := NewClient(ClientOptions{ + URL: "pulsar://*.*.*.*:6000", + ListenerName: "custom:1300*****0/vpc-******/subnet-********", + Authentication: NewAuthenticationToken("eyJh****"), + }) if err != nil { log.Fatal(err) }