![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Provide an ephemeral, in-memory kv store. More...
#include <freeradius-devel/server/base.h>#include <freeradius-devel/server/module.h>#include <freeradius-devel/server/module_rlm.h>#include <freeradius-devel/unlang/xlat_func.h>#include <freeradius-devel/util/htrie.h>
Include dependency graph for rlm_kv.c:Go to the source code of this file.
Data Structures | |
| struct | rlm_kv_data_s |
| KV structure. More... | |
| struct | rlm_kv_mutable_t |
| Mutable data structure which is shared across all threads. More... | |
| struct | rlm_kv_t |
Macros | |
| #define | LOG_PREFIX mctx->mi->name |
Typedefs | |
| typedef struct rlm_kv_data_s | rlm_kv_data_t |
Functions | |
| static xlat_action_t | kv_delete_xlat (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| Delete an entry from the KV. | |
| static xlat_action_t | kv_read_xlat (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| Read an entry from the KV. | |
| static xlat_action_t | kv_write_xlat (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| Write an entry to the KV. | |
| static int | mod_bootstrap (module_inst_ctx_t const *mctx) |
| static int | mod_detach (module_detach_ctx_t const *mctx) |
| static int | mod_instantiate (module_inst_ctx_t const *mctx) |
| static int | mod_mutable_free (rlm_kv_mutable_t *mutable) |
Variables | |
| static xlat_arg_parser_t const | kv_read_xlat_args [] |
| static xlat_arg_parser_t const | kv_write_xlat_args [] |
| static const conf_parser_t | module_config [] |
| module_rlm_t | rlm_kv |
Provide an ephemeral, in-memory kv store.
This module will use infinite memory if asked, as it doesn't track or expire old entries.
This module uses cross-thread mutex locks, so if used a lot, it will cause all threads to synchronise, and will kill performance.
Definition in file rlm_kv.c.
| struct rlm_kv_data_s |
KV structure.
The "key" field MUST be first, so that we can do lookups by giving the htrie code a "fr_value_box_t*", which is the key.
Collaboration diagram for rlm_kv_data_s:| Data Fields | ||
|---|---|---|
| rlm_kv_entry_t | entry | for expiration |
| fr_value_box_t | key | indexed key |
| fr_value_box_t | value | value to store |
| struct rlm_kv_mutable_t |
Collaboration diagram for rlm_kv_mutable_t:| Data Fields | ||
|---|---|---|
| rlm_kv_list_t | list | for expiring old entries |
| pthread_mutex_t | mutex | for thread locking. |
| fr_htrie_t * | tree | for kv stores. |
| struct rlm_kv_t |
Collaboration diagram for rlm_kv_t:| Data Fields | ||
|---|---|---|
| fr_htrie_type_t | htype | |
| char const * | key_type | data type of the key |
| uint32_t | max_entries | |
| rlm_kv_mutable_t * | mutable | |
| fr_type_t | type | |
| typedef struct rlm_kv_data_s rlm_kv_data_t |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| module_rlm_t rlm_kv |
1.9.8