diff --git a/docs/en/14-reference/03-connector/05-go.mdx b/docs/en/14-reference/03-connector/05-go.mdx index 0088f230069b15f12e455b5b6d2d6fa261fc5a14..7e5023b6a7ae9eb4f3372997f1f1c6f1a994878d 100644 --- a/docs/en/14-reference/03-connector/05-go.mdx +++ b/docs/en/14-reference/03-connector/05-go.mdx @@ -379,6 +379,15 @@ Note: `tmq.TopicPartition` is reserved for compatibility purpose Commit information. +* `func (c *Consumer) Assignment() (partitions []tmq.TopicPartition, err error)` + +Get Assignment(TDengine >= 3.0.5.0 and driver-go >= v3.5.0 are required). + +* `func (c *Consumer) Seek(partition tmq.TopicPartition, ignoredTimeoutMs int) error` +Note: `ignoredTimeoutMs` is reserved for compatibility purpose + +Seek offset(TDengine >= 3.0.5.0 and driver-go >= v3.5.0 are required). + * `func (c *Consumer) Unsubscribe() error` Unsubscribe. @@ -468,6 +477,15 @@ Note: `tmq.TopicPartition` is reserved for compatibility purpose Commit information. +* `func (c *Consumer) Assignment() (partitions []tmq.TopicPartition, err error)` + +Get Assignment(TDengine >= 3.0.5.0 and driver-go >= v3.5.0 are required). + +* `func (c *Consumer) Seek(partition tmq.TopicPartition, ignoredTimeoutMs int) error` +Note: `ignoredTimeoutMs` is reserved for compatibility purpose + +Seek offset(TDengine >= 3.0.5.0 and driver-go >= v3.5.0 are required). + * `func (c *Consumer) Unsubscribe() error` Unsubscribe. @@ -476,7 +494,7 @@ Unsubscribe. Close consumer. -For a complete example see [GitHub sample file](https://github.com/taosdata/driver-go/blob/3.0/examples/tmqoverws/main.go) +For a complete example see [GitHub sample file](https://github.com/taosdata/driver-go/blob/main/examples/tmqoverws/main.go) ### parameter binding via WebSocket @@ -524,7 +542,7 @@ For a complete example see [GitHub sample file](https://github.com/taosdata/driv Closes the parameter binding. -For a complete example see [GitHub sample file](https://github.com/taosdata/driver-go/blob/3.0/examples/stmtoverws/main.go) +For a complete example see [GitHub sample file](https://github.com/taosdata/driver-go/blob/main/examples/stmtoverws/main.go) ## API Reference diff --git a/docs/zh/08-connector/20-go.mdx b/docs/zh/08-connector/20-go.mdx index fd6df992b530fdce4427e34ef8bc227f449eaac7..546132818207a323fe9aa39cf77fe45edda7b3d8 100644 --- a/docs/zh/08-connector/20-go.mdx +++ b/docs/zh/08-connector/20-go.mdx @@ -383,6 +383,15 @@ func main() { 提交消息。 +* `func (c *Consumer) Assignment() (partitions []tmq.TopicPartition, err error)` + + 获取消费进度。(需要 TDengine >= 3.0.5.0, driver-go >= v3.5.0) + +* `func (c *Consumer) Seek(partition tmq.TopicPartition, ignoredTimeoutMs int) error` +注意:出于兼容目的保留 `ignoredTimeoutMs` 参数,当前未使用 + + 按照指定的进度消费。(需要 TDengine >= 3.0.5.0, driver-go >= v3.5.0) + * `func (c *Consumer) Close() error` 关闭连接。 @@ -468,11 +477,20 @@ func main() { 提交消息。 +* `func (c *Consumer) Assignment() (partitions []tmq.TopicPartition, err error)` + + 获取消费进度。(需要 TDengine >= 3.0.5.0, driver-go >= v3.5.0) + +* `func (c *Consumer) Seek(partition tmq.TopicPartition, ignoredTimeoutMs int) error` +注意:出于兼容目的保留 `ignoredTimeoutMs` 参数,当前未使用 + + 按照指定的进度消费。(需要 TDengine >= 3.0.5.0, driver-go >= v3.5.0) + * `func (c *Consumer) Close() error` 关闭连接。 -完整订阅示例参见 [GitHub 示例文件](https://github.com/taosdata/driver-go/blob/3.0/examples/tmqoverws/main.go) +完整订阅示例参见 [GitHub 示例文件](https://github.com/taosdata/driver-go/blob/main/examples/tmqoverws/main.go) ### 通过 WebSocket 进行参数绑定 @@ -520,7 +538,7 @@ func main() { 结束参数绑定。 -完整参数绑定示例参见 [GitHub 示例文件](https://github.com/taosdata/driver-go/blob/3.0/examples/stmtoverws/main.go) +完整参数绑定示例参见 [GitHub 示例文件](https://github.com/taosdata/driver-go/blob/main/examples/stmtoverws/main.go) ## API 参考