docs: add defination of tmq_config_res_t & fix spell error (#30271)

This commit is contained in:
WANG MINGMING 2025-03-19 17:21:58 +08:00 committed by GitHub
parent ccaa0b91ae
commit c291aea0f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 9 deletions

View File

@ -80,7 +80,7 @@ TDengine 目前可以在 Linux、 Windows、macOS 等平台上安装和运行。
### Ubuntu 18.04、20.04、22.04 ### Ubuntu 18.04、20.04、22.04
```bash ```bash
sudo apt-get udpate sudo apt-get update
sudo apt-get install -y gcc cmake build-essential git libjansson-dev \ sudo apt-get install -y gcc cmake build-essential git libjansson-dev \
libsnappy-dev liblzma-dev zlib1g-dev pkg-config libsnappy-dev liblzma-dev zlib1g-dev pkg-config
``` ```

View File

@ -1121,10 +1121,14 @@ In addition to using SQL or parameter binding APIs to insert data, you can also
- conf: [Input] Pointer to a valid tmq_conf_t structure, representing a TMQ configuration object. - conf: [Input] Pointer to a valid tmq_conf_t structure, representing a TMQ configuration object.
- key: [Input] Configuration item key name. - key: [Input] Configuration item key name.
- value: [Input] Configuration item value. - value: [Input] Configuration item value.
- **Return Value**: Returns a tmq_conf_res_t enum value, indicating the result of the configuration setting. - **Return Value**: Returns a tmq_conf_res_t enum value, indicating the result of the configuration setting. tmq_conf_res_t defined as follows:
- TMQ_CONF_OK: Successfully set the configuration item. ```
- TMQ_CONF_INVALID_KEY: Invalid key value. typedef enum tmq_conf_res_t {
- TMQ_CONF_UNKNOWN: Invalid key name. TMQ_CONF_UNKNOWN = -2, // invalid key
TMQ_CONF_INVALID = -1, // invalid value
TMQ_CONF_OK = 0, // success
} tmq_conf_res_t;
```
- `void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *param)` - `void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *param)`
- **Interface Description**: Sets the auto-commit callback function in the TMQ configuration object. - **Interface Description**: Sets the auto-commit callback function in the TMQ configuration object.

View File

@ -1115,10 +1115,14 @@ TDengine 的异步 API 均采用非阻塞调用模式。应用程序可以用多
- conf[入参] 指向一个有效的 tmq_conf_t 结构体指针,该结构体代表一个 TMQ 配置对象。 - conf[入参] 指向一个有效的 tmq_conf_t 结构体指针,该结构体代表一个 TMQ 配置对象。
- key[入参] 数配置项的键名。 - key[入参] 数配置项的键名。
- value[入参] 配置项的值。 - value[入参] 配置项的值。
- **返回值**:返回一个 tmq_conf_res_t 枚举值,表示配置设置的结果。 - **返回值**:返回一个 tmq_conf_res_t 枚举值表示配置设置的结果。tmq_conf_res_t 定义如下:
- TMQ_CONF_OK成功设置配置项。 ```
- TMQ_CONF_INVALID_KEY键值无效。 typedef enum tmq_conf_res_t {
- TMQ_CONF_UNKNOWN键名无效。 TMQ_CONF_UNKNOWN = -2, // 键名无效
TMQ_CONF_INVALID = -1, // 键值无效
TMQ_CONF_OK = 0, // 成功设置配置项
} tmq_conf_res_t;
```
- `void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *param)` - `void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *param)`
- **接口说明**:设置 TMQ 配置对象中的自动提交回调函数。 - **接口说明**:设置 TMQ 配置对象中的自动提交回调函数。