Skip to main content

heartbeat

The compute's own registration with the hub.

Separate from the pod's dataset heartbeat (ADR 0011): this carries only what identifies the compute -- installation id, cluster and private IP -- and gets back the compute id and domain its TLS certificate is issued for. The hub refreshes the compute's DNS entry when the IP changes.

Module​

Functions​

register_compute​

def register_compute(    hub: BitfountHub, *, instance_id: str, cluster_id: str | None,) ‑> ComputeRegistration | None:

Register (create or refresh) this compute with the hub.

Never raises: registration is retried on the next tick, and a failure here must not touch the compute's children.

Arguments

  • hub: The compute's authenticated hub session.
  • instance_id: The installation id.
  • cluster_id: The compute cluster, or None for a compute API key.

Returns The registration, or None if it could not be completed this time -- no private IP could be determined, the hub rejected the request, or the response was not what was expected.

Classes​

ComputeRegistration​

class ComputeRegistration(compute_id: str, domain: str):

What the hub knows this compute as.

Variables​

  • static compute_id : str
  • static domain : str