rippled
Loading...
Searching...
No Matches
xrpld
peerfinder
detail
Store.h
1
#pragma once
2
3
namespace
xrpl
{
4
namespace
PeerFinder {
5
7
class
Store
8
{
9
public
:
10
virtual
~Store
()
11
{
12
}
13
14
// load the bootstrap cache
15
using
load_callback
=
std::function
<void(
beast::IP::Endpoint
,
int
)>;
16
virtual
std::size_t
17
load
(
load_callback
const
& cb) = 0;
18
19
// save the bootstrap cache
20
struct
Entry
21
{
22
explicit
Entry
() =
default
;
23
24
beast::IP::Endpoint
endpoint
;
25
int
valence
;
26
};
27
virtual
void
28
save
(
std::vector<Entry>
const
& v) = 0;
29
};
30
31
}
// namespace PeerFinder
32
}
// namespace xrpl
beast::IP::Endpoint
A version-independent IP address and port combination.
Definition
IPEndpoint.h:18
xrpl::PeerFinder::Store
Abstract persistence for PeerFinder data.
Definition
Store.h:8
xrpl::PeerFinder::Store::~Store
virtual ~Store()
Definition
Store.h:10
xrpl::PeerFinder::Store::load
virtual std::size_t load(load_callback const &cb)=0
xrpl::PeerFinder::Store::save
virtual void save(std::vector< Entry > const &v)=0
std::function
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
std::size_t
xrpl::PeerFinder::Store::Entry
Definition
Store.h:21
xrpl::PeerFinder::Store::Entry::valence
int valence
Definition
Store.h:25
xrpl::PeerFinder::Store::Entry::endpoint
beast::IP::Endpoint endpoint
Definition
Store.h:24
xrpl::PeerFinder::Store::Entry::Entry
Entry()=default
std::vector
Generated by
1.9.8