![]() |
GNUnet
0.16.x
|
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. More... | |
ssize_t(* | put )(void *cls, const struct GNUNET_HashCode *key, uint32_t xor_distance, size_t size, const char *data, enum GNUNET_BLOCK_Type type, struct GNUNET_TIME_Absolute discard_time, unsigned int path_info_len, const struct GNUNET_DHT_PathElement *path_info) |
Store an item in the datastore. More... | |
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. More... | |
enum GNUNET_GenericReturnValue(* | del )(void *cls) |
Delete the entry with the lowest expiration value from the datacache right now. More... | |
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. More... | |
struct returned by the initialization function of the plugin
Definition at line 97 of file gnunet_datacache_plugin.h.
void* GNUNET_DATACACHE_PluginFunctions::cls |
Closure to pass to all plugin functions.
Definition at line 102 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, const struct GNUNET_HashCode *key, uint32_t xor_distance, size_t size, const char *data, enum GNUNET_BLOCK_Type type, struct GNUNET_TIME_Absolute discard_time, unsigned int path_info_len, const struct GNUNET_DHT_PathElement *path_info) |
Store an item in the datastore.
cls | closure (internal context for the plugin) |
key | key to store the value under |
xor_distance | how close is key to our PID? |
size | number of bytes in data |
data | data to store |
type | type of the value |
discard_time | when to discard the value in any case |
path_info_len | number of entries in path_info |
path_info | a path through the network |
Definition at line 118 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 141 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 141 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 175 of file gnunet_datacache_plugin.h.