|
| struct | Descriptor |
| | Parsed metadata for an endpoint, used for routing and graph introspection. More...
|
|
| | Endpoint (Port &port) |
| | Construct a local endpoint from an existing port.
|
| | Endpoint (std::string scheme, std::string address, std::string node, std::string port) |
| | Construct a remote endpoint from manual descriptors.
|
| Location | location () const noexcept |
| | Check if the endpoint is local or remote.
|
| Descriptor const & | desc () const noexcept |
| | Access the descriptor.
|
| Port * | port () const noexcept |
| | Return the underlying port if local, otherwise nullptr.
|
| NodePtr | node () const noexcept |
| | Return the owning node pointer if local, otherwise nullptr.
|
| bool | isLocal () const noexcept |
| | Helper to check if location is Location::Local.
|
| bool | isRemote () const noexcept |
| | Helper to check if location is Location::Remote.
|
| std::string | toString (bool forceUriFormat=false) const |
| | Format the endpoint as a string for logging or UI.
|
◆ Location
Logical descriptor of a port endpoint in the dataflow graph.
An dfx::Core::Endpoint acts as a bridge between the physical and logical representation of a port. It encapsulates the identity of a connection point, whether it is local (attached to a runtime dfx::Core::Port) or remote (identified via a URI-style descriptor).
- Location and Discovery
- The class distinguishes between two states:
- URI Decomposition
- Remote endpoints are defined by a Descriptor, which breaks down URIs like tcp://127.0.0.1:8080/node.port into its constituent parts:
This structure allows graph exporters and runtime components to maintain a coherent graph view even when endpoints exist in separate memory spaces.
Tells where the port associated with this Endpoint is located.
| Enumerator |
|---|
| Local | The associated port is local and accessible to this dfx instance.
|
| Remote | The associated port is not managed by this dfx instance.
|
◆ Endpoint() [1/2]
| dfx::Core::Endpoint::Endpoint |
( |
Port & | port | ) |
|
|
explicit |
Construct a local endpoint from an existing port.
- Parameters
-
| port | Reference to the local port object. |
◆ Endpoint() [2/2]
| dfx::Core::Endpoint::Endpoint |
( |
std::string | scheme, |
|
|
std::string | address, |
|
|
std::string | node, |
|
|
std::string | port ) |
|
explicit |
Construct a remote endpoint from manual descriptors.
- Parameters
-
| scheme | Transport protocol identifier. |
| address | Transport address string. |
| node | Target node name. |
| port | Target port name. |
◆ desc()
| Descriptor const & dfx::Core::Endpoint::desc |
( |
| ) |
const |
|
inlinenoexcept |
◆ isLocal()
| bool dfx::Core::Endpoint::isLocal |
( |
| ) |
const |
|
inlinenoexcept |
◆ isRemote()
| bool dfx::Core::Endpoint::isRemote |
( |
| ) |
const |
|
inlinenoexcept |
◆ location()
| Location dfx::Core::Endpoint::location |
( |
| ) |
const |
|
inlinenoexcept |
Check if the endpoint is local or remote.
◆ node()
| NodePtr dfx::Core::Endpoint::node |
( |
| ) |
const |
|
noexcept |
Return the owning node pointer if local, otherwise nullptr.
◆ port()
| Port * dfx::Core::Endpoint::port |
( |
| ) |
const |
|
inlinenoexcept |
Return the underlying port if local, otherwise nullptr.
◆ toString()
| std::string dfx::Core::Endpoint::toString |
( |
bool | forceUriFormat = false | ) |
const |
Format the endpoint as a string for logging or UI.
URI format is the following: scheme://address/node.port
- Parameters
-
| forceUriFormat | If true, outputs as a URI string even for local ports. |
The documentation for this class was generated from the following file: