Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::inspect::ControlIdentityRegistry Class Reference

Broker-owned identity state. More...

#include <control_identity.hpp>

Public Types

using Clock = std::function<std::chrono::steady_clock::time_point()>

Public Member Functions

 ControlIdentityRegistry (ControlIdentityRegistryConfig config={}, std::shared_ptr< ControlSecurityAuditLog > audit_log={}, Clock clock=[] { return std::chrono::steady_clock::now();})
 ~ControlIdentityRegistry ()
 ControlIdentityRegistry (const ControlIdentityRegistry &)=delete
ControlIdentityRegistry & operator= (const ControlIdentityRegistry &)=delete
const ControlBrokerId & broker_id () const
ControlBootstrapResult issue_bootstrap (const VerifiedControlPeerIdentity &expected_peer)
ControlClientResult redeem_bootstrap (std::string_view ticket_id, std::span< const std::uint8_t > secret, const VerifiedControlPeerIdentity &observed_peer, std::string_view durable_principal={}, ControlDurableClientLifetime durable_lifetime=ControlDurableClientLifetime::Broker)
std::vector< ControlClientId > reclaim_process_clients (const std::function< ControlProcessLiveness(const ControlPeerEvidence &)> &process_liveness)
 Removes process-scoped clients whose kernel process is gone or whose reconnect lease expired.
bool refresh_client (const ControlClientId &client_id, const VerifiedControlPeerIdentity &peer)
bool disconnect_client (const ControlClientId &client_id)
std::optional< ControlClientIdentity > client (const ControlClientId &client_id) const
ControlRegistrationResult register_instance (const VerifiedControlPeerIdentity &peer, ControlRegistrationRequest request, bool publish=true)
bool publish_instance (const ControlRegistrationId &registration_id, const VerifiedControlPeerIdentity &peer)
bool heartbeat (const ControlRegistrationId &registration_id, const VerifiedControlPeerIdentity &peer)
bool unregister_instance (const ControlRegistrationId &registration_id, const VerifiedControlPeerIdentity &peer)
std::optional< ControlRegistration > registration (std::string_view session_id, std::string_view instance_id, std::string_view publication_id) const
std::optional< ControlRegistration > registration (const ControlRegistrationId &registration_id) const
std::vector< ControlRegistration > registrations () const
 Snapshot of every currently-live exact registration.
void sweep_expired ()

Detailed Description

Broker-owned identity state.

It contains no listener and accepts only verified peers supplied by the future OS-authenticated IPC composition root.

Member Typedef Documentation

◆ Clock

using pulp::inspect::ControlIdentityRegistry::Clock = std::function<std::chrono::steady_clock::time_point()>

Constructor & Destructor Documentation

◆ ControlIdentityRegistry() [1/2]

pulp::inspect::ControlIdentityRegistry::ControlIdentityRegistry ( ControlIdentityRegistryConfig config = {},
std::shared_ptr< ControlSecurityAuditLog > audit_log = {},
Clock clock = [] { return std::chrono::steady_clock::now();} )
explicit

◆ ~ControlIdentityRegistry()

pulp::inspect::ControlIdentityRegistry::~ControlIdentityRegistry ( )

◆ ControlIdentityRegistry() [2/2]

pulp::inspect::ControlIdentityRegistry::ControlIdentityRegistry ( const ControlIdentityRegistry & )
delete

Member Function Documentation

◆ broker_id()

const ControlBrokerId & pulp::inspect::ControlIdentityRegistry::broker_id ( ) const

◆ client()

std::optional< ControlClientIdentity > pulp::inspect::ControlIdentityRegistry::client ( const ControlClientId & client_id) const

◆ disconnect_client()

bool pulp::inspect::ControlIdentityRegistry::disconnect_client ( const ControlClientId & client_id)

◆ heartbeat()

bool pulp::inspect::ControlIdentityRegistry::heartbeat ( const ControlRegistrationId & registration_id,
const VerifiedControlPeerIdentity & peer )

◆ issue_bootstrap()

ControlBootstrapResult pulp::inspect::ControlIdentityRegistry::issue_bootstrap ( const VerifiedControlPeerIdentity & expected_peer)

◆ operator=()

ControlIdentityRegistry & pulp::inspect::ControlIdentityRegistry::operator= ( const ControlIdentityRegistry & )
delete

◆ publish_instance()

bool pulp::inspect::ControlIdentityRegistry::publish_instance ( const ControlRegistrationId & registration_id,
const VerifiedControlPeerIdentity & peer )

◆ reclaim_process_clients()

std::vector< ControlClientId > pulp::inspect::ControlIdentityRegistry::reclaim_process_clients ( const std::function< ControlProcessLiveness(const ControlPeerEvidence &)> & process_liveness)

Removes process-scoped clients whose kernel process is gone or whose reconnect lease expired.

The broker owns grant/cancellation cleanup for every returned identity.

◆ redeem_bootstrap()

ControlClientResult pulp::inspect::ControlIdentityRegistry::redeem_bootstrap ( std::string_view ticket_id,
std::span< const std::uint8_t > secret,
const VerifiedControlPeerIdentity & observed_peer,
std::string_view durable_principal = {},
ControlDurableClientLifetime durable_lifetime = ControlDurableClientLifetime::Broker )

◆ refresh_client()

bool pulp::inspect::ControlIdentityRegistry::refresh_client ( const ControlClientId & client_id,
const VerifiedControlPeerIdentity & peer )

◆ register_instance()

ControlRegistrationResult pulp::inspect::ControlIdentityRegistry::register_instance ( const VerifiedControlPeerIdentity & peer,
ControlRegistrationRequest request,
bool publish = true )

◆ registration() [1/2]

std::optional< ControlRegistration > pulp::inspect::ControlIdentityRegistry::registration ( const ControlRegistrationId & registration_id) const

◆ registration() [2/2]

std::optional< ControlRegistration > pulp::inspect::ControlIdentityRegistry::registration ( std::string_view session_id,
std::string_view instance_id,
std::string_view publication_id ) const

◆ registrations()

std::vector< ControlRegistration > pulp::inspect::ControlIdentityRegistry::registrations ( ) const

Snapshot of every currently-live exact registration.

Human labels are metadata only; callers must select by instance_id and reject ambiguity.

◆ sweep_expired()

void pulp::inspect::ControlIdentityRegistry::sweep_expired ( )

◆ unregister_instance()

bool pulp::inspect::ControlIdentityRegistry::unregister_instance ( const ControlRegistrationId & registration_id,
const VerifiedControlPeerIdentity & peer )

The documentation for this class was generated from the following file: