summaryrefslogtreecommitdiff
path: root/src/include/taler_exchangedb_plugin.h
diff options
context:
space:
mode:
authorMarco Boss <bossm8@bfh.ch>2022-03-31 21:31:07 +0200
committerMarco Boss <bossm8@bfh.ch>2022-03-31 21:31:07 +0200
commit75c1e10a67d94f43d0c06433efc2b78c10bae5c5 (patch)
tree0e6d5dad60dfd8cc41b5a81d31b6e213e9bccd5e /src/include/taler_exchangedb_plugin.h
parent0cf9a9984ce733d8315057b810bfda90cec5c04a (diff)
downloadexchange-75c1e10a67d94f43d0c06433efc2b78c10bae5c5.tar.gz
exchange-75c1e10a67d94f43d0c06433efc2b78c10bae5c5.tar.bz2
exchange-75c1e10a67d94f43d0c06433efc2b78c10bae5c5.zip
add shard init for shard node
Diffstat (limited to 'src/include/taler_exchangedb_plugin.h')
-rw-r--r--src/include/taler_exchangedb_plugin.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index b3e51c107..48fce4d92 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -2230,6 +2230,17 @@ struct TALER_EXCHANGEDB_Plugin
(*create_tables)(void *cls);
/**
+ * Initialize the database of a shard node
+ *
+ * @param cls the @e cls of this struct with the plugin-specific state
+ * @param idx the current shard index, will be appended to tables as suffix
+ * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
+ */
+ enum GNUNET_GenericReturnValue
+ (*create_shard_tables)(void *cls,
+ uint32_t idx);
+
+ /**
* Change already present tables of the database to num partitions
* Only has an effect if there are default partitions only
*
@@ -2239,10 +2250,11 @@ struct TALER_EXCHANGEDB_Plugin
*/
enum GNUNET_GenericReturnValue
(*setup_partitions)(void *cls,
- const uint32_t num);
+ uint32_t num);
/**
- * Change already present tables of the database to num shards
+ * Change already present tables of the database to num foreign tables on
+ * num foreign servers (shards).
* Only has an effect if there are default partitions only
*
* @param cls the @e cls of this struct with the plugin-specific state
@@ -2253,8 +2265,8 @@ struct TALER_EXCHANGEDB_Plugin
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
*/
enum GNUNET_GenericReturnValue
- (*setup_shards)(void *cls,
- const uint32_t num);
+ (*setup_foreign_servers)(void *cls,
+ uint32_t num);
/**
* Start a transaction.