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