Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
bridge_interface.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2021-2025, 🍀☀🌕🌥 🌊
3// See the LICENSE file in the project root for full license information.
4
5#pragma once
6#ifndef KCENON_NETWORK_INTERNAL_INTEGRATION_BRIDGE_INTERFACE_H_
7#define KCENON_NETWORK_INTERNAL_INTEGRATION_BRIDGE_INTERFACE_H_
8
51#include <chrono>
52#include <map>
53#include <string>
54
56
79 std::string integration_name;
80
90 std::map<std::string, std::string> properties;
91};
92
115 bool is_healthy{true};
116
122 std::chrono::steady_clock::time_point last_activity;
123
134 std::map<std::string, double> custom_metrics;
135};
136
164public:
165 virtual ~INetworkBridge() = default;
166
195 virtual VoidResult initialize(const BridgeConfig& config) = 0;
196
220 virtual VoidResult shutdown() = 0;
221
243 virtual bool is_initialized() const = 0;
244
266 virtual BridgeMetrics get_metrics() const = 0;
267};
268
269} // namespace kcenon::network::integration
270
271// Backward compatibility namespace alias
272namespace network_system {
274}
275
276#endif // KCENON_NETWORK_INTERNAL_INTEGRATION_BRIDGE_INTERFACE_H_
Abstract interface for external system integration bridges.
virtual VoidResult shutdown()=0
Shutdown the bridge and release resources.
virtual BridgeMetrics get_metrics() const =0
Get current metrics and health information.
virtual bool is_initialized() const =0
Check if the bridge is initialized and ready for use.
virtual VoidResult initialize(const BridgeConfig &config)=0
Initialize the bridge with configuration.
Network-specific error and result type definitions.
Configuration for bridge initialization.
std::map< std::string, std::string > properties
Key-value properties for bridge-specific configuration.
std::string integration_name
Name identifying the external system being integrated.
Metrics and health information for a bridge.
std::chrono::steady_clock::time_point last_activity
Timestamp of last activity or health check.
std::map< std::string, double > custom_metrics
Bridge-specific custom metrics.
bool is_healthy
Overall health status of the bridge.