CachedDnsName
This class provides a mechanism for retrieving and caching the fully qualified domain name (FQDN) of the local host. It ensures the FQDN is formatted using punycode and stores the result internally to optimize subsequent lookups. The class also implements a string representation that returns the cached domain name directly.
Attributes
| Attribute | Type | Description |
|---|---|---|
| _fqdn | string | Stores the punycode-encoded fully qualified domain name to cache the result of the DNS lookup. |
Methods
get_fqdn()
@classmethod
def get_fqdn() - > string
Fetches and caches the punycode-encoded fully qualified domain name of the local host.
Returns
| Type | Description |
|---|---|
string | The cached fully qualified domain name, converted to punycode format. |