GNUnet  0.11.x
Data Fields
GNUNET_DATASTORE_PluginFunctions Struct Reference

Each plugin is required to return a pointer to a struct of this type as the return value from its entry point. More...

#include <gnunet_datastore_plugin.h>

Collaboration diagram for GNUNET_DATASTORE_PluginFunctions:
[legend]

Data Fields

void * cls
 Closure to use for all of the following callbacks (except "next_request"). More...
 
PluginEstimateSize estimate_size
 Calculate the current on-disk size of the SQ store. More...
 
PluginPut put
 Function to store an item in the datastore. More...
 
PluginGetKey get_key
 Get a particular datum matching a given hash from the datastore. More...
 
PluginGetType get_zero_anonymity
 Get datum (of the specified type) with anonymity level zero. More...
 
PluginGetRandom get_replication
 Function to get a random item with high replication score from the database, lowering the item's replication score. More...
 
PluginGetRandom get_expiration
 Function to get a random expired item or, if none are expired, either the oldest entry or one with a low priority (depending on what was efficiently implementable). More...
 
PluginDrop drop
 Delete the database. More...
 
PluginGetKeys get_keys
 Iterate over all keys in the database. More...
 
PluginRemoveKey remove_key
 Function to remove an item from the database. More...
 

Detailed Description

Each plugin is required to return a pointer to a struct of this type as the return value from its entry point.

Definition at line 315 of file gnunet_datastore_plugin.h.

Field Documentation

◆ cls

void* GNUNET_DATASTORE_PluginFunctions::cls

◆ estimate_size

PluginEstimateSize GNUNET_DATASTORE_PluginFunctions::estimate_size

◆ put

PluginPut GNUNET_DATASTORE_PluginFunctions::put

◆ get_key

PluginGetKey GNUNET_DATASTORE_PluginFunctions::get_key

◆ get_zero_anonymity

PluginGetType GNUNET_DATASTORE_PluginFunctions::get_zero_anonymity

◆ get_replication

PluginGetRandom GNUNET_DATASTORE_PluginFunctions::get_replication

Function to get a random item with high replication score from the database, lowering the item's replication score.

Returns a single random item from those with the highest replication counters. The item's replication counter is decremented by one IF it was positive before.

Definition at line 351 of file gnunet_datastore_plugin.h.

Referenced by handle_get_replication(), libgnunet_plugin_datastore_heap_init(), libgnunet_plugin_datastore_mysql_init(), libgnunet_plugin_datastore_postgres_init(), libgnunet_plugin_datastore_sqlite_init(), and libgnunet_plugin_datastore_template_init().

◆ get_expiration

PluginGetRandom GNUNET_DATASTORE_PluginFunctions::get_expiration

Function to get a random expired item or, if none are expired, either the oldest entry or one with a low priority (depending on what was efficiently implementable).

Definition at line 358 of file gnunet_datastore_plugin.h.

Referenced by delete_expired(), libgnunet_plugin_datastore_heap_init(), libgnunet_plugin_datastore_mysql_init(), libgnunet_plugin_datastore_postgres_init(), libgnunet_plugin_datastore_sqlite_init(), libgnunet_plugin_datastore_template_init(), and manage_space().

◆ drop

PluginDrop GNUNET_DATASTORE_PluginFunctions::drop

◆ get_keys

PluginGetKeys GNUNET_DATASTORE_PluginFunctions::get_keys

◆ remove_key

PluginRemoveKey GNUNET_DATASTORE_PluginFunctions::remove_key

The documentation for this struct was generated from the following file: