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