dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
SourceTransport.hpp
1// SPDX-FileCopyrightText: 2026 Vincent Leroy
2// SPDX-License-Identifier: MIT
3//
4// This file is part of dfx.
5//
6// Licensed under the MIT License. See the LICENSE file in the project root
7// for full license information.
8
9#pragma once
10
11// Project includes
12#include "../../messages/Message.hpp"
13#include "../Transport.hpp"
14
15namespace dfx::Core
16{
25{
26public:
32 : Transport(Role::Source, std::move(endpoint), std::move(config))
33 {}
34
35protected:
45};
46
48using SourceTransportPtr = std::unique_ptr<SourceTransport>;
49} // !namespace dfx::Core
Definition Endpoint.hpp:24
SourceTransport(Endpoint endpoint, nlohmann::json config)
Constructs a SourceTransport with the Role::Source role.
Definition SourceTransport.hpp:31
bool transmitMessage(MessagePtr message)
Forwards a message to the attached Channel for orchestration.
Endpoint const & endpoint() const noexcept
Gets the endpoint descriptor associated with this transport.
Definition Transport.hpp:161
nlohmann::json const & config() const noexcept
Gets the JSON configuration used to initialize this transport.
Definition Transport.hpp:176
Role
Defines the operational role of a transport relative to a channel.
Definition Transport.hpp:130
@ Source
The transport acts as a message producer for the channel.
Definition Transport.hpp:131
Transport(Role role, Endpoint endpoint, nlohmann::json config)
Constructs a transport instance.
Definition Channel.hpp:25
std::unique_ptr< Message > MessagePtr
Unique ownership handle for messages.
Definition Message.hpp:27
std::unique_ptr< SourceTransport > SourceTransportPtr
Unique ownership handle for SourceTransport.
Definition SourceTransport.hpp:48
STL namespace.