APIs to register new Mgmt (records) entries.
| 7729 | |
| 7730 | // APIs to register new Mgmt (records) entries. |
| 7731 | TSReturnCode |
| 7732 | TSMgmtStringCreate(TSRecordType rec_type, const char *name, const TSMgmtString data_default, TSRecordUpdateType update_type, |
| 7733 | TSRecordCheckType check_type, const char *check_regex, TSRecordAccessType access_type) |
| 7734 | { |
| 7735 | if (check_regex == nullptr && check_type != TS_RECORDCHECK_NULL) { |
| 7736 | return TS_ERROR; |
| 7737 | } |
| 7738 | if (REC_ERR_OKAY != RecRegisterConfigString(static_cast<enum RecT>(rec_type), name, data_default, |
| 7739 | static_cast<enum RecUpdateT>(update_type), static_cast<enum RecCheckT>(check_type), |
| 7740 | check_regex, REC_SOURCE_PLUGIN, static_cast<enum RecAccessT>(access_type))) { |
| 7741 | return TS_ERROR; |
| 7742 | } |
| 7743 | |
| 7744 | return TS_SUCCESS; |
| 7745 | } |
| 7746 | |
| 7747 | TSReturnCode |
| 7748 | TSMgmtIntCreate(TSRecordType rec_type, const char *name, TSMgmtInt data_default, TSRecordUpdateType update_type, |
no test coverage detected