dockerzhang commented on code in PR #765:
URL: https://github.com/apache/inlong-website/pull/765#discussion_r1211379457


##########
docs/sdk/dataproxy-sdk/go.md:
##########
@@ -0,0 +1,170 @@
+---
+title: Golang SDK
+sidebar_position: 4
+---
+
+## Create real-time synchronization task
+Create a task on the Dashboard or with the command line tool, and set `Auto 
Push` (autonomous push) as the data source type.
+
+## Import Golang SDK
+To use the Golang SDK, you need to import it into your projects. Import the 
Golang SDK:
+
+```go
+import 
"github.com/apache/inlong/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-golang/dataproxy"
+```
+
+
+## Data report process
+After importing the SDK, you can initialize a 
[Client](https://github.com/apache/inlong/tree/master/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-golang/dataproxy/client.go)
 instance, and then call `Send()` or `SendAsync()` to produce messages to 
DataProxy, SDK will put the messages with a same StreamID into a batch and send 
them together. A demo can be found at: 
[example_test.go](https://github.com/apache/inlong/tree/master/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-golang/dataproxy/example_test.go).
+Basically, there are 3 steps to produce messages:
+
+### Initialize the SDK
+```go
+client, err := dataproxy.NewClient(
+       dataproxy.WithGroupID("test"),                  
+dataproxy.WithURL("http://127.0.0.1:8083/inlong/manager/openapi/dataproxy/getIpList";),
+       dataproxy.WithMetricsName("test"),
+)
+
+if err != nil {
+       fmt.Println(err)
+       return
+}
+```
+
+where:

Review Comment:
   Parameters:



##########
i18n/zh-CN/docusaurus-plugin-content-docs/version-1.7.0/sdk/dataproxy-sdk/go.md:
##########
@@ -0,0 +1,170 @@
+---
+title: Golang SDK
+sidebar_position: 4
+---
+
+## 新建实时同步任务
+在 Dashboard 或者通过命令行工具创建任务,数据源类型使用 `Auto Push` (自主推送)。
+
+## 引入 Golang SDK
+需要在项目中导入 SDK 的包,进行 SDK 的使用。导入方式如下:
+
+```go
+import 
"github.com/apache/inlong/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-golang/dataproxy"
+```
+
+
+## 数据上报流程
+导入 SDK 后,通过实例化一个 
[Client](https://github.com/apache/inlong/tree/master/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-golang/dataproxy/client.go)
 接口对象后,调用相关的同步( `Send()` )或 异步( `SendAsync()` )接口来完成单条数据的上报任务,SDK 内部会根据 
StreamID 将相同 StreamID 的数据批量上报。发送 Demo 可参考 
[example_test.go](https://github.com/apache/inlong/tree/master/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-golang/dataproxy/example_test.go)。
+整体流程包括以下三个步骤:
+
+### 初始化 SDK
+```go
+client, err := dataproxy.NewClient(
+       dataproxy.WithGroupID("test"),                  
+dataproxy.WithURL("http://127.0.0.1:8083/inlong/manager/openapi/dataproxy/getIpList";),
+       dataproxy.WithMetricsName("test"),
+)
+
+if err != nil {
+       fmt.Println(err)
+       return
+}
+```
+
+参数说明:
+
+- `dataproxy.WithGroupID("test")` 设置了 GroupID ;
+- 
`dataproxy.WithURL("http://127.0.0.1:8083/inlong/manager/openapi/dataproxy/getIpList";)`
 设置了服务注册中心的 URL ;

Review Comment:
   设置了服务注册中心的 URL
   ->
   设置 Manager URL



##########
docs/sdk/dataproxy-sdk/go.md:
##########
@@ -0,0 +1,170 @@
+---
+title: Golang SDK
+sidebar_position: 4
+---
+
+## Create real-time synchronization task
+Create a task on the Dashboard or with the command line tool, and set `Auto 
Push` (autonomous push) as the data source type.
+
+## Import Golang SDK
+To use the Golang SDK, you need to import it into your projects. Import the 
Golang SDK:
+
+```go
+import 
"github.com/apache/inlong/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-golang/dataproxy"
+```
+
+
+## Data report process
+After importing the SDK, you can initialize a 
[Client](https://github.com/apache/inlong/tree/master/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-golang/dataproxy/client.go)
 instance, and then call `Send()` or `SendAsync()` to produce messages to 
DataProxy, SDK will put the messages with a same StreamID into a batch and send 
them together. A demo can be found at: 
[example_test.go](https://github.com/apache/inlong/tree/master/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-golang/dataproxy/example_test.go).
+Basically, there are 3 steps to produce messages:
+
+### Initialize the SDK
+```go
+client, err := dataproxy.NewClient(
+       dataproxy.WithGroupID("test"),                  
+dataproxy.WithURL("http://127.0.0.1:8083/inlong/manager/openapi/dataproxy/getIpList";),
+       dataproxy.WithMetricsName("test"),
+)
+
+if err != nil {
+       fmt.Println(err)
+       return
+}
+```
+
+where:
+
+- `dataproxy.WithGroupID("test")` sets the GroupID;
+- 
`dataproxy.WithURL("http://127.0.0.1:8083/inlong/manager/openapi/dataproxy/getIpList";)`
 sets the service registry URL;

Review Comment:
   sets the service registry URL
   ->
   sets the Manager URL



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to