Reading replication parameters from config file

This commit is contained in:
jmjatlanta 2017-07-20 09:12:31 -05:00
parent 6e19c14bab
commit 1fe5be1c5c
10 changed files with 104 additions and 9 deletions

View file

@ -7,6 +7,7 @@
#include "bootstrap_peers.h"
#include "addresses.h"
#include "gateway.h"
#include "replication.h"
struct MDNS {
int enabled;
@ -44,6 +45,7 @@ struct RepoConfig {
//struct supernode_routing supernode_client_config;
//struct api api;
struct Reprovider reprovider;
struct Replication* replication;
};
/**

View file

@ -0,0 +1,20 @@
#include "libp2p/utils/vector.h"
struct Replication {
int announce_minutes;
struct Libp2pVector* nodes;
};
/***
* allocate memory and initialize the replication struct
* @param replication a pointer to the struct to be allocated
* @returns true(1) on success, false(0) otherwise
*/
int repo_config_replication_new(struct Replication** replication);
/***
* Frees memory of a replication struct
* @param replication the replication struct
* @returns true(1);
*/
int repo_config_replication_free(struct Replication* replication);