From 967abf1c9f7e7728a6f0a019efdf5b67cda07b17 Mon Sep 17 00:00:00 2001 From: Yuzhe Yang <31816344+Dravening@users.noreply.github.com> Date: Wed, 21 Jul 2021 23:14:16 +0800 Subject: [PATCH] doc: refresh v2.0 doc (#279) --- README.md | 6 +++--- README_CN.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c5ba34d1..0ca5b332 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ err := namingClient.Subscribe(vo.SubscribeParam{ ServiceName: "demo.go", GroupName: "group-a", // default value is DEFAULT_GROUP Clusters: []string{"cluster-a"}, // default value is DEFAULT - SubscribeCallback: func(services []model.SubscribeService, err error) { + SubscribeCallback: func(services []model.Instance, err error) { log.Printf("\n\n callback return services:%s \n\n", utils.ToJsonString(services)) }, }) @@ -280,7 +280,7 @@ err := namingClient.Unsubscribe(vo.SubscribeParam{ ServiceName: "demo.go", GroupName: "group-a", // default value is DEFAULT_GROUP Clusters: []string{"cluster-a"}, // default value is DEFAULT - SubscribeCallback: func(services []model.SubscribeService, err error) { + SubscribeCallback: func(services []model.Instance, err error) { log.Printf("\n\n callback return services:%s \n\n", utils.ToJsonString(services)) }, }) @@ -290,7 +290,7 @@ err := namingClient.Unsubscribe(vo.SubscribeParam{ * Get all services name:GetAllServicesInfo ```go -serviceInfos, err := client.GetAllServicesInfo(vo.GetAllServiceInfoParam{ +serviceInfos, err := namingClient.GetAllServicesInfo(vo.GetAllServiceInfoParam{ NameSpace: "0e83cc81-9d8c-4bb8-a28a-ff703187543f", PageNo: 1, PageSize: 10, diff --git a/README_CN.md b/README_CN.md index d9265e74..1b1ca9fb 100644 --- a/README_CN.md +++ b/README_CN.md @@ -265,7 +265,7 @@ err := namingClient.Subscribe(vo.SubscribeParam{ ServiceName: "demo.go", GroupName: "group-a", // 默认值DEFAULT_GROUP Clusters: []string{"cluster-a"}, // 默认值DEFAULT - SubscribeCallback: func(services []model.SubscribeService, err error) { + SubscribeCallback: func(services []model.Instance, err error) { log.Printf("\n\n callback return services:%s \n\n", utils.ToJsonString(services)) }, }) @@ -280,7 +280,7 @@ err := namingClient.Unsubscribe(vo.SubscribeParam{ ServiceName: "demo.go", GroupName: "group-a", // 默认值DEFAULT_GROUP Clusters: []string{"cluster-a"}, // 默认值DEFAULT - SubscribeCallback: func(services []model.SubscribeService, err error) { + SubscribeCallback: func(services []model.Instance, err error) { log.Printf("\n\n callback return services:%s \n\n", utils.ToJsonString(services)) }, }) @@ -290,7 +290,7 @@ err := namingClient.Unsubscribe(vo.SubscribeParam{ * 获取服务名列表:GetAllServicesInfo ```go -serviceInfos, err := client.GetAllServicesInfo(vo.GetAllServiceInfoParam{ +serviceInfos, err := namingClient.GetAllServicesInfo(vo.GetAllServiceInfoParam{ NameSpace: "0e83cc81-9d8c-4bb8-a28a-ff703187543f", PageNo: 1, PageSize: 10,