-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(shm/kv) retrieve items by key hash
The change is motivated by the upcoming proxy-wasm metrics support, which will be built atop `ngx_wasm_shm_kv`. Proxy-Wasm filter developers are expected to define metrics before using them. When a metric is defined the host returns an id to the filter which is later used for updating or retrieving that metric's value. As such, now `ngx_wasm_shm_kv_get_locked` expects either a key (ngx_str_t *) or its hash (uint32_t *). If both are provided, the hash is used and the key is ignored. A new function `ngx_wasm_shm_rbtree_lookup` is also introduced allowing item retrieval using only key hash.
- Loading branch information
Showing
3 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters