MADARA  3.4.1
EndpointDiscovery.h
Go to the documentation of this file.
1 
2 
3 #ifndef _MADARA_FILTERS_ENDPOINT_DISCOVERY_H_
4 #define _MADARA_FILTERS_ENDPOINT_DISCOVERY_H_
5 
15 #include <string>
16 #include <vector>
17 #include <map>
18 #include <list>
21 #include "madara/utility/StdInt.h"
22 #include "madara/MadaraExport.h"
26 
27 #include "AggregateFilter.h"
28 
29 namespace madara
30 {
31 namespace filters
32 {
36 class MADARA_EXPORT EndpointDiscovery : public AggregateFilter
37 {
38 public:
47  EndpointDiscovery(const std::string& prefix = ".endpoints",
48  knowledge::KnowledgeRecord::Integer heart_beat = -1);
49 
53  virtual ~EndpointDiscovery();
54 
61  virtual void filter(knowledge::KnowledgeMap& records,
62  const transport::TransportContext& transport_context,
63  knowledge::Variables& vars);
64 
65 protected:
70 
75 
80 
85 
90 };
91 }
92 }
93 
94 #endif // _MADARA_FILTERS_ENDPOINT_DISCOVERY_H_
Abstract base class for implementing aggregate record filters via a functor interface.
Filter for discovering remote hosts that have sent messages.
bool initialized_
Tracks if the peers_ map has been initialized.
knowledge::containers::Map endpoints_
A map of discovered peers.
knowledge::KnowledgeRecord::Integer last_clear_
The time of the last clear of the peer_list.
knowledge::KnowledgeRecord::Integer heart_beat_
The time to keep record of a peer.
Provides an interface for external functions into the MADARA KaRL variable settings.
Definition: Variables.h:53
This class stores a map of strings to KaRL variables.
Definition: Map.h:33
Provides context about the transport.
constexpr string_t string
::std::map< std::string, KnowledgeRecord > KnowledgeMap
Copyright(c) 2020 Galois.