struct returned by the initialization function of the plugin More...
#include <gnunet_datacache_plugin.h>
Data Fields | |
| void * | cls |
| Closure to pass to all plugin functions. | |
| ssize_t(* | put )(void *cls, uint32_t xor_distance, const struct GNUNET_DATACACHE_Block *block) |
| Store an item in the datastore. | |
| unsigned int(* | get )(void *cls, const struct GNUNET_HashCode *key, enum GNUNET_BLOCK_Type type, GNUNET_DATACACHE_Iterator iter, void *iter_cls) |
| Iterate over the results for a particular key in the datastore. | |
| enum GNUNET_GenericReturnValue(* | del )(void *cls) |
| Delete the entry with the lowest expiration value from the datacache right now. | |
| unsigned int(* | get_closest )(void *cls, const struct GNUNET_HashCode *key, enum GNUNET_BLOCK_Type type, unsigned int num_results, GNUNET_DATACACHE_Iterator iter, void *iter_cls) |
| Iterate over the results that are "close" to a particular key in the datacache. | |
struct returned by the initialization function of the plugin
Definition at line 101 of file gnunet_datacache_plugin.h.
| void* GNUNET_DATACACHE_PluginFunctions::cls |
Closure to pass to all plugin functions.
Definition at line 106 of file gnunet_datacache_plugin.h.
Referenced by libgnunet_plugin_datacache_heap_done(), libgnunet_plugin_datacache_postgres_done(), libgnunet_plugin_datacache_sqlite_done(), and libgnunet_plugin_datacache_template_done().
| ssize_t(* GNUNET_DATACACHE_PluginFunctions::put) (void *cls, uint32_t xor_distance, const struct GNUNET_DATACACHE_Block *block) |
Store an item in the datastore.
| cls | closure (internal context for the plugin) |
| xor_distance | how close is key to our PID? |
| block | data to store |
Definition at line 116 of file gnunet_datacache_plugin.h.
| unsigned int(* GNUNET_DATACACHE_PluginFunctions::get) (void *cls, const struct GNUNET_HashCode *key, enum GNUNET_BLOCK_Type type, GNUNET_DATACACHE_Iterator iter, void *iter_cls) |
Iterate over the results for a particular key in the datastore.
| cls | closure (internal context for the plugin) |
| key | key to look for |
| type | entries of which type are relevant? |
| iter | maybe NULL (to just count) |
| iter_cls | closure for iter |
Definition at line 133 of file gnunet_datacache_plugin.h.
| enum GNUNET_GenericReturnValue(* GNUNET_DATACACHE_PluginFunctions::del) (void *cls) |
Delete the entry with the lowest expiration value from the datacache right now.
| cls | closure (internal context for the plugin) |
Definition at line 133 of file gnunet_datacache_plugin.h.
| unsigned int(* GNUNET_DATACACHE_PluginFunctions::get_closest) (void *cls, const struct GNUNET_HashCode *key, enum GNUNET_BLOCK_Type type, unsigned int num_results, GNUNET_DATACACHE_Iterator iter, void *iter_cls) |
Iterate over the results that are "close" to a particular key in the datacache.
"close" is defined as returning the num_results that are numerically closest and larger than key and also num_results that are numerically lower than key. Thus, the maximum number of results returned is actually twice num_results.
| cls | closure (internal context for the plugin) |
| key | area of the keyspace to look into |
| type | desired block type for the replies |
| num_results | half the number of results that should be returned to iter |
| iter | maybe NULL (to just count) |
| iter_cls | closure for iter |
Definition at line 167 of file gnunet_datacache_plugin.h.