Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
control_endpoint.hpp
Go to the documentation of this file.
1#pragma once
2
7
8#include <chrono>
9#include <cstddef>
10#include <cstdint>
11#include <filesystem>
12#include <functional>
13#include <memory>
14#include <optional>
15#include <string>
16#include <string_view>
17
18namespace pulp::inspect {
19
21class ControlBroker;
22
32
34 std::function<std::optional<ControlConnectionAdmission>(std::string_view admission_id)>;
35
40
49
51 std::filesystem::path endpoint_path;
52 std::string sdk_version;
53 std::string broker_id;
54 std::uint64_t process_generation = 0;
55 std::size_t maximum_connections = 16;
58 std::chrono::milliseconds write_timeout = std::chrono::seconds(3);
59 std::chrono::milliseconds frame_read_timeout = std::chrono::seconds(3);
62 std::function<bool(const ControlPeerEvidence&)> authorize_client;
69 std::function<std::optional<DurableClientPrincipal>(const ControlPeerEvidence&)>
77};
78
85 public:
87 ControlEndpointConfig config, ControlHostRouter* host_router = nullptr,
88 ControlEndpointEnrollmentContext* enrollment_context = nullptr,
89 ControlBroker* management_broker = nullptr);
91
94
95 bool start();
96 void stop() noexcept;
97 bool is_listening() const noexcept;
98 const std::filesystem::path& endpoint_path() const noexcept;
99
100 private:
101 struct Impl;
102 std::unique_ptr<Impl> impl_;
103};
104
105} // namespace pulp::inspect
Dormant composition root for the local capability-control broker.
Definition control_broker.hpp:45
Broker-owned, process-local admission registry for authenticated carriers.
Definition control_connection_admission.hpp:71
bool is_listening() const noexcept
ControlEndpoint & operator=(const ControlEndpoint &)=delete
const std::filesystem::path & endpoint_path() const noexcept
ControlEndpoint(ControlService &service, ControlAdmissionConsumer consume_admission, ControlEndpointConfig config, ControlHostRouter *host_router=nullptr, ControlEndpointEnrollmentContext *enrollment_context=nullptr, ControlBroker *management_broker=nullptr)
ControlEndpoint(const ControlEndpoint &)=delete
Bounded, process-local enrollment registry.
Definition control_host_enrollment.hpp:71
Dormant broker-to-host route selector.
Definition control_host_router.hpp:15
Dormant typed dispatcher over the broker composition root.
Definition control_service.hpp:44
@ path
Definition scene_node.hpp:93
Definition agent_context.hpp:7
constexpr std::size_t kControlMaximumEnvelopeBytes
Definition control_protocol.hpp:19
ControlDurableClientLifetime
Definition control_identity.hpp:170
@ Broker
Definition control_identity.hpp:171
std::function< std::optional< ControlConnectionAdmission >(std::string_view admission_id)> ControlAdmissionConsumer
Definition control_endpoint.hpp:33
ControlTrustedHostLaunchStatus
Definition control_trusted_host_launcher.hpp:17
@ InvalidConfiguration
Definition control_trusted_host_launcher.hpp:19
STL namespace.
Definition control_grants.hpp:34
Maps an already-authorized, kernel-observed peer to a broker-owned reconnectable principal.
Definition control_endpoint.hpp:65
std::string value
Definition control_endpoint.hpp:66
ControlDurableClientLifetime lifetime
Definition control_endpoint.hpp:67
Definition control_endpoint.hpp:50
std::function< ControlConsentDecision(const ControlGrantConsentRequest &)> decide_consent
Optional trusted consent source.
Definition control_endpoint.hpp:73
std::chrono::milliseconds write_timeout
Definition control_endpoint.hpp:58
std::function< bool(const ControlPeerEvidence &)> authorize_client
Installed adapters may self-enroll only when this broker-owned policy accepts kernel-observed,...
Definition control_endpoint.hpp:62
std::size_t maximum_connections
Definition control_endpoint.hpp:55
std::filesystem::path endpoint_path
Definition control_endpoint.hpp:51
std::size_t maximum_queued_frames_per_connection
Definition control_endpoint.hpp:56
std::string broker_id
Definition control_endpoint.hpp:53
std::uint64_t process_generation
Definition control_endpoint.hpp:54
std::function< std::optional< DurableClientPrincipal >(const ControlPeerEvidence &)> durable_client_principal
Definition control_endpoint.hpp:70
std::size_t maximum_queued_bytes_per_connection
Definition control_endpoint.hpp:57
ControlTrustedHostManagement trusted_hosts
Typed broker-owned host launch seam.
Definition control_endpoint.hpp:76
std::chrono::milliseconds frame_read_timeout
Definition control_endpoint.hpp:59
std::string sdk_version
Definition control_endpoint.hpp:52
Explicit injection seam for endpoint-owned enrollment.
Definition control_endpoint.hpp:27
ControlConnectionAdmissionStore & admissions
Definition control_endpoint.hpp:30
ControlBroker & broker
Definition control_endpoint.hpp:29
ControlHostEnrollmentStore & enrollments
Definition control_endpoint.hpp:28
Consent input assembled only after the broker has authenticated the client and resolved an exact live...
Definition control_grants.hpp:78
Evidence observed by the local IPC carrier.
Definition control_identity.hpp:53
Definition control_trusted_host_inventory.hpp:57
Definition control_trusted_host_inventory.hpp:34
ControlTrustedHostLaunchStatus status
Definition control_endpoint.hpp:37
std::string explanation
Definition control_endpoint.hpp:38
Definition control_endpoint.hpp:41
std::function< ControlTrustedHostInventoryPrepareResult(const ControlTrustedHostLaunchIntent &)> prepare
Definition control_endpoint.hpp:43
std::function< ControlTrustedHostInventoryPrepareResult(std::string_view)> prepare_installed
Production path: the client supplies only a bounded broker-owned name; executable,...
Definition control_endpoint.hpp:46
std::function< ControlTrustedHostManagementLaunchResult(std::string_view)> launch
Definition control_endpoint.hpp:47