rippled
Loading...
Searching...
No Matches
Source.h
1#pragma once
2
3#include <xrpld/peerfinder/PeerfinderManager.h>
4
5#include <boost/system/error_code.hpp>
6
7namespace xrpl {
8namespace PeerFinder {
9
18class Source
19{
20public:
22 struct Results
23 {
24 explicit Results() = default;
25
26 // error_code on a failure
27 boost::system::error_code error;
28
29 // list of fetched endpoints
31 };
32
33 virtual ~Source()
34 {
35 }
36 virtual std::string const&
37 name() = 0;
38 virtual void
40 {
41 }
42 virtual void
43 fetch(Results& results, beast::Journal journal) = 0;
44};
45
46} // namespace PeerFinder
47} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:40
A static or dynamic source of peer addresses.
Definition Source.h:19
virtual std::string const & name()=0
virtual void cancel()
Definition Source.h:39
virtual void fetch(Results &results, beast::Journal journal)=0
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
The results of a fetch.
Definition Source.h:23
boost::system::error_code error
Definition Source.h:27