GNUnet 0.22.0
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 319 of file gnunet_datastore_plugin.h.

Field Documentation

◆ cls

◆ estimate_size

PluginEstimateSize GNUNET_DATASTORE_PluginFunctions::estimate_size

Calculate the current on-disk size of the SQ store.

Estimates are fine, if that's the only thing available.

Definition at line 331 of file gnunet_datastore_plugin.h.

Referenced by disk_utilization_change_cb(), libgnunet_plugin_datastore_sqlite_init(), and process_stat_done().

◆ put

PluginPut GNUNET_DATASTORE_PluginFunctions::put

Function to store an item in the datastore.

Definition at line 336 of file gnunet_datastore_plugin.h.

Referenced by handle_put(), and libgnunet_plugin_datastore_sqlite_init().

◆ get_key

PluginGetKey GNUNET_DATASTORE_PluginFunctions::get_key

Get a particular datum matching a given hash from the datastore.

Definition at line 341 of file gnunet_datastore_plugin.h.

Referenced by handle_get(), handle_get_key(), and libgnunet_plugin_datastore_sqlite_init().

◆ get_zero_anonymity

PluginGetType GNUNET_DATASTORE_PluginFunctions::get_zero_anonymity

Get datum (of the specified type) with anonymity level zero.

Definition at line 346 of file gnunet_datastore_plugin.h.

Referenced by handle_get_zero_anonymity(), and libgnunet_plugin_datastore_sqlite_init().

◆ 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 355 of file gnunet_datastore_plugin.h.

Referenced by handle_get_replication(), and libgnunet_plugin_datastore_sqlite_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 362 of file gnunet_datastore_plugin.h.

Referenced by delete_expired(), libgnunet_plugin_datastore_sqlite_init(), and manage_space().

◆ drop

PluginDrop GNUNET_DATASTORE_PluginFunctions::drop

Delete the database.

The next operation is guaranteed to be unloading of the module.

Definition at line 368 of file gnunet_datastore_plugin.h.

Referenced by cleaning_task(), and libgnunet_plugin_datastore_sqlite_init().

◆ get_keys

PluginGetKeys GNUNET_DATASTORE_PluginFunctions::get_keys

Iterate over all keys in the database.

Definition at line 373 of file gnunet_datastore_plugin.h.

Referenced by libgnunet_plugin_datastore_sqlite_init(), and process_stat_done().

◆ remove_key

PluginRemoveKey GNUNET_DATASTORE_PluginFunctions::remove_key

Function to remove an item from the database.

Definition at line 378 of file gnunet_datastore_plugin.h.

Referenced by handle_remove(), and libgnunet_plugin_datastore_sqlite_init().


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