nvflare.client.cell.attach_rendezvous module

Shared-filesystem discovery for a CJ-owned Client API Attach listener.

class AttachEndpointKey[source]

Bases: object

ATTACH_ID = 'attach_id'
CJ_FQCN = 'cj_fqcn'
CONNECTION_SECURITY = 'connection_security'
CONNECT_URL = 'connect_url'
INSTANCE_ID = 'instance_id'
SCHEMA_VERSION = 'schema_version'
SITE_NAME = 'site_name'
TRAINER_FQCN = 'trainer_fqcn'
exception AttachEndpointOwnershipError[source]

Bases: RuntimeError

The publisher’s process-held claim no longer matches its claim directory.

class AttachEndpointPublisher(root_dir: str, site_name: str, attach_id: str)[source]

Bases: object

Own one attach-ID claim and publish a live listener endpoint within it.

close() → None[source]
publish(cj_fqcn: str, trainer_fqcn: str, connect_url: str, connection_security: str) → None[source]
exception AttachRendezvousCancelled[source]

Bases: RuntimeError

A trainer stopped while waiting for a shared-file endpoint.

attach_claim_dir(root_dir: str, site_name: str, attach_id: str) → str[source]

Return the deterministic claim directory for one site/attach ID.

validate_shared_file_listener(root_dir: str, connect_url: str) → str[source]

Validate a FileDriver listener as a concrete endpoint inside the configured trust root.

wait_for_attach_endpoint(root_dir: str, site_name: str, attach_id: str, timeout: float | None, stop_event=None) → dict[source]

Wait for an endpoint whose publisher still holds the cross-node claim lock.