17 #ifndef CYBER_SERVICE_DISCOVERY_SPECIFIC_MANAGER_CHANNEL_MANAGER_H_ 18 #define CYBER_SERVICE_DISCOVERY_SPECIFIC_MANAGER_CHANNEL_MANAGER_H_ 22 #include <unordered_map> 23 #include <unordered_set> 34 namespace service_discovery {
36 class TopologyManager;
74 void GetProtoDesc(
const std::string& channel_name, std::string* proto_desc);
82 void GetMsgType(
const std::string& channel_name, std::string* msg_type);
92 bool HasWriter(
const std::string& channel_name);
126 bool HasReader(
const std::string& channel_name);
182 const std::string& rhs_node_name);
195 bool Check(
const RoleAttributes& attr)
override;
196 void Dispose(
const ChangeMsg& msg)
override;
197 void OnTopoModuleLeave(
const std::string& host_name,
int process_id)
override;
199 void DisposeJoin(
const ChangeMsg& msg);
200 void DisposeLeave(
const ChangeMsg& msg);
202 void ScanMessageType(
const ChangeMsg& msg);
220 #endif // CYBER_SERVICE_DISCOVERY_SPECIFIC_MANAGER_CHANNEL_MANAGER_H_ std::unordered_set< std::string > ExemptedMessageTypes
Definition: channel_manager.h:49
void GetWritersOfChannel(const std::string &channel_name, RoleAttrVec *writers)
Get the Writers Of Channel object.
ChannelManager()
Construct a new Channel Manager object.
bool IsMessageTypeMatching(const std::string &lhs, const std::string &rhs)
Is lhs and rhs have same MessageType.
bool HasWriter(const std::string &channel_name)
Inquire if there is at least one Writer that publishes channel_name
void GetDownstreamOfNode(const std::string &node_name, RoleAttrVec *downstream_nodes)
Get the Downstream Of Node object. If Node A has writer that publishes channel-1, and Node B has read...
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
elements in Cyber – Node, Channel, Service, Writer, Reader, Client and Server's relationship is pres...
Definition: topology_manager.h:64
Base class for management of Topology elements. Manager can Join/Leave the Topology, and Listen the topology change.
Definition: manager.h:51
FlowDirection
describe the flow direction between nodes As the DAG below A-—>B--—>C<--—D GetDirectionOf(A, B) is UPSTREAM GetDirectionOf(C, A) is DOWNSTREAM GetDirectionOf(D, A) is UNREACHABLE GetDirectionOf(A, D) is UNREACHABLE
Definition: graph.h:39
void GetUpstreamOfNode(const std::string &node_name, RoleAttrVec *upstream_nodes)
Get the Upstream Of Node object. If Node A has writer that publishes channel-1, and Node B has reader...
virtual ~ChannelManager()
Destroy the Channel Manager object.
void GetWriters(RoleAttrVec *writers)
Get All Writers object.
void GetProtoDesc(const std::string &channel_name, std::string *proto_desc)
Get the Protocol Desc of channel_name
void GetReadersOfNode(const std::string &node_name, RoleAttrVec *readers)
Get the Readers Of Node object.
std::vector< proto::RoleAttributes > RoleAttrVec
Definition: channel_manager.h:46
void GetReaders(RoleAttrVec *readers)
Get All Readers object.
bool HasReader(const std::string &channel_name)
Inquire if there is at least one Reader that publishes channel_name
void GetWritersOfNode(const std::string &node_name, RoleAttrVec *writers)
Get the Writers Of Node object.
void GetMsgType(const std::string &channel_name, std::string *msg_type)
Get the Msg Type of channel_name
void GetChannelNames(std::vector< std::string > *channels)
Get all channel names in the topology.
Definition: multi_value_warehouse.h:31
void GetReadersOfChannel(const std::string &channel_name, RoleAttrVec *readers)
Get the Readers Of Channel object.
Topology Manager of Service related.
Definition: channel_manager.h:42
FlowDirection GetFlowDirection(const std::string &lhs_node_name, const std::string &rhs_node_name)
Get the Flow Direction from lhs_node_node to rhs_node_name You can see FlowDirection's description fo...