Reading replication parameters from config file
This commit is contained in:
parent
6e19c14bab
commit
1fe5be1c5c
10 changed files with 104 additions and 9 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
20
include/ipfs/repo/config/replication.h
Normal file
20
include/ipfs/repo/config/replication.h
Normal 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);
|
Loading…
Add table
Add a link
Reference in a new issue