#include <assert.h>
Go to the source code of this file.
|
| struct | kb_item |
| | Knowledge base item (defined by name, type (int/char*) and value). Implemented as a singly linked list. More...
|
| |
| struct | kb |
| | Top-level KB. This is to be inherited by KB implementations. More...
|
| |
| struct | kb_operations |
| | KB interface. Functions provided by an implementation. All functions have to be provided, there is no default/fallback. These functions should be called via the corresponding static inline wrappers below. See the wrappers for the documentation. More...
|
| |
|
| typedef struct kb * | kb_t |
| | type abstraction to hide KB internals. More...
|
| |
| #define KB_PATH_DEFAULT "/tmp/redis.sock" |
Default KB location.
TODO This should eventually be expressed as an URI when/if multiple KB backends are supported (e.g.: redis:///tmp/redis.sock).
type abstraction to hide KB internals.
Possible type of a kb_item.
| Enumerator |
|---|
| KB_TYPE_UNSPEC |
Ignore the value (name/presence test).
|
| KB_TYPE_INT |
The kb_items v should then be interpreted as int.
|
| KB_TYPE_STR |
The kb_items v should then be interpreted as char*.
|
| KB_TYPE_CNT |
|
| void kb_item_free |
( |
struct kb_item * |
| ) |
|
Release a KB item (or a list).
Default KB operations. No selection mechanism is provided yet since there's only one implementation (redis-based).