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>
19
#include "
madara/knowledge/KnowledgeRecord.h
"
20
#include "
madara/knowledge/Functions.h
"
21
#include "
madara/utility/StdInt.h
"
22
#include "madara/MadaraExport.h"
23
#include "
madara/transport/TransportContext.h
"
24
#include "
madara/knowledge/Variables.h
"
25
#include "
madara/knowledge/containers/Map.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
:
69
bool
initialized_
;
70
74
std::string
prefix_
;
75
79
knowledge::containers::Map
endpoints_
;
80
84
knowledge::KnowledgeRecord::Integer
heart_beat_
;
85
89
knowledge::KnowledgeRecord::Integer
last_clear_
;
90
};
91
}
92
}
93
94
#endif
// _MADARA_FILTERS_ENDPOINT_DISCOVERY_H_
Functions.h
KnowledgeRecord.h
Map.h
StdInt.h
TransportContext.h
Variables.h
madara::filters::AggregateFilter
Abstract base class for implementing aggregate record filters via a functor interface.
Definition:
AggregateFilter.h:35
madara::filters::EndpointDiscovery
Filter for discovering remote hosts that have sent messages.
Definition:
EndpointDiscovery.h:37
madara::filters::EndpointDiscovery::initialized_
bool initialized_
Tracks if the peers_ map has been initialized.
Definition:
EndpointDiscovery.h:69
madara::filters::EndpointDiscovery::prefix_
std::string prefix_
The context.
Definition:
EndpointDiscovery.h:74
madara::filters::EndpointDiscovery::endpoints_
knowledge::containers::Map endpoints_
A map of discovered peers.
Definition:
EndpointDiscovery.h:79
madara::filters::EndpointDiscovery::last_clear_
knowledge::KnowledgeRecord::Integer last_clear_
The time of the last clear of the peer_list.
Definition:
EndpointDiscovery.h:89
madara::filters::EndpointDiscovery::heart_beat_
knowledge::KnowledgeRecord::Integer heart_beat_
The time to keep record of a peer.
Definition:
EndpointDiscovery.h:84
madara::knowledge::KnowledgeRecord::Integer
int64_t Integer
Definition:
KnowledgeRecord.h:131
madara::knowledge::Variables
Provides an interface for external functions into the MADARA KaRL variable settings.
Definition:
Variables.h:53
madara::knowledge::containers::Map
This class stores a map of strings to KaRL variables.
Definition:
Map.h:33
madara::transport::TransportContext
Provides context about the transport.
Definition:
TransportContext.h:20
AggregateFilter.h
madara::knowledge::tags::string
constexpr string_t string
Definition:
KnowledgeRecord.h:56
madara::knowledge::KnowledgeMap
::std::map< std::string, KnowledgeRecord > KnowledgeMap
Definition:
KnowledgeRecord.h:1818
madara
Copyright(c) 2020 Galois.
Definition:
AggregateFilter.h:31
include
madara
filters
EndpointDiscovery.h
Generated on Sat Jan 20 2024 00:40:26 for MADARA by
1.9.1