Discovery

class HazelcastCloudAddressProvider(host, url, connection_timeout, logger_extras=None)

Bases: object

Provides initial addresses for client to find and connect to a node.

logger = <Logger HazelcastClient.HazelcastCloudAddressProvider (WARNING)>
load_addresses()

Loads member addresses from Hazelcast.cloud endpoint.

Returns

(Sequence), The possible member addresses to connect to.

class HazelcastCloudAddressTranslator(host, url, connection_timeout, logger_extras=None)

Bases: object

Resolves private IP addresses of Hazelcast.cloud service.

logger = <Logger HazelcastClient.HazelcastCloudAddressTranslator (WARNING)>
translate(address)

Translates the given address to another address specific to network or service.

Parameters

address – (Address), private address to be translated

Returns

(Address), new address if given address is known, otherwise returns null

refresh()

Refreshes the internal lookup table if necessary.

class HazelcastCloudDiscovery(host, url, connection_timeout)

Bases: object

Discovery service that discover nodes via Hazelcast.cloud https://coordinator.hazelcast.cloud/cluster/discovery?token=<TOKEN>

CLOUD_URL_BASE_PROPERTY = <hazelcast.config.ClientProperty object>

Internal client property to change base url of cloud discovery endpoint. Used for testing cloud discovery.

discover_nodes()

Discovers nodes from Hazelcast.cloud.

Returns

(dict), Dictionary that maps private addresses to public addresses.

static get_host_and_url(properties, cloud_token)

Helper method to get host and url that can be used in HTTPSConnection.

Parameters
  • properties – Client config properties.

  • cloud_token – Cloud discovery token.

Returns

Host and URL pair