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