Description
It would be useful to be able to have an identifier (not necessarily unique) in remap rules. Something like e.g.
map http://example.com http://a.example.com @id="Rule 1"
Where the ID can be any freeform string up to say 32 characters (fixed size for efficient APIs). In addition, we would also add a new log tag, RID or some such, which can be used in custom log formats.
Finally, since not all remapping happens through remap.config, we'd want to add two new APIs as well (this is where the fixed size string comes to play, to avoid allocations):
const char* TSRemapIdentifierGet();
and
TSReturnCode TSRemapIdentifierSet(const char* str);
The string is guaranteed to be NULL terminated (for the Get()'er to be safe and easy to use).
Question: Does it makes sense to instead use a (char*, int) to pass along ? I think not personally, and we have precedence in both (in marshaled buffers, this makes more sense).
Attachments
Issue Links
- is related to
-
TS-2241 Add plugin API to see status of remap
- Open