funcx.endpoint package

Submodules

funcx.endpoint.auth module

funcx.endpoint.auth.load_auth_client()

Create an AuthClient for the portal

No credentials are used if the server is not production

Returns:Client used to perform GlobusAuth actions
Return type:globus_sdk.ConfidentialAppAuthClient

funcx.endpoint.config module

funcx.endpoint.endpoint module

class funcx.endpoint.endpoint.State

Bases: object

DEBUG = False
FUNCX_CONFIG = {}
FUNCX_CONFIG_FILE = '/home/docs/.funcx/config.py'
FUNCX_DEFAULT_CONFIG_TEMPLATE = '/home/docs/checkouts/readthedocs.org/user_builds/funcx/checkouts/latest/funcx/executors/high_throughput/global_config.py'
FUNCX_DIR = '/home/docs/.funcx'
funcx.endpoint.endpoint.check_pidfile(filepath, match_name, endpoint_name)

Helper function to identify possible dead endpoints

funcx.endpoint.endpoint.cli_run()

Entry point for setuptools to point to

funcx.endpoint.endpoint.complete_endpoint_name()
funcx.endpoint.endpoint.configure_endpoint(name: str = <typer.models.ArgumentInfo object>, endpoint_config: str = <typer.models.OptionInfo object>)

Configure an endpoint

Drops a config.py template into the funcx configs directory. The template usually goes to ~/.funcx/<ENDPOINT_NAME>/config.py

funcx.endpoint.endpoint.delete_endpoint(name: str = <typer.models.ArgumentInfo object>, autoconfirm: bool = <typer.models.OptionInfo object>)

Deletes an endpoint and its config.

funcx.endpoint.endpoint.init_endpoint()

Setup funcx dirs and default endpoint config files

TODO : Every mechanism that will update the config file, must be using a locking mechanism, ideally something like fcntl https://docs.python.org/3/library/fcntl.html to ensure that multiple endpoint invocations do not mangle the funcx config files or the lockfile module.

funcx.endpoint.endpoint.init_endpoint_dir(endpoint_name, endpoint_config=None)

Initialize a clean endpoint dir

Returns if an endpoint_dir already exists

Parameters:
  • endpoint_name (str) – Name of the endpoint, which will be used to name the dir for the endpoint in the FUNCX_DIR
  • endpoint_config (str) – Path to a config file to be used instead of the funcX default config file
funcx.endpoint.endpoint.list_endpoints()

List all available endpoints

funcx.endpoint.endpoint.main(ctx: typer.models.Context, _: bool = <typer.models.OptionInfo object>, debug: bool = <typer.models.OptionInfo object>, config_dir: str = <typer.models.OptionInfo object>)
funcx.endpoint.endpoint.register_endpoint(funcx_client, endpoint_name, endpoint_uuid, metadata, endpoint_dir)

Register the endpoint and return the registration info.

Parameters:
  • funcx_client (FuncXClient) – The auth’d client to communicate with the funcX service
  • endpoint_name (str) – The name to register the endpoint with
  • endpoint_uuid (str) – The uuid to register the endpoint with
  • endpoint_dir (str) – The directory to write endpoint registration info into.
funcx.endpoint.endpoint.register_with_hub(endpoint_uuid, endpoint_dir, address, redis_host='funcx-redis.wtgh6h.0001.use1.cache.amazonaws.com')

This currently registers directly with the Forwarder micro service.

Can be used as an example of how to make calls this it, while the main API is updated to do this calling on behalf of the endpoint in the second iteration.

funcx.endpoint.endpoint.restart_endpoint(name: str = <typer.models.ArgumentInfo object>)

Restarts an endpoint

funcx.endpoint.endpoint.start_endpoint(name: str = <typer.models.ArgumentInfo object>, endpoint_uuid: str = <typer.models.OptionInfo object>)

Start an endpoint

This function will do: 1. Connect to the broker service, and register itself 2. Get connection info from broker service 3. Start the interchange as a daemon

Broker service |
—–2—-> Forwarder |
/register <—–3—-+ ^ |
+—–^———————–+————-+
| |

1 4 6 | v |

+—–+—–+—–+ v | Start |—5—> Interchange | Endpoint | daemon +—————–+

Parameters:
  • name (str) –
  • endpoint_uuid (str) –
funcx.endpoint.endpoint.stop_endpoint(name: str = <typer.models.ArgumentInfo object>)

Stops an endpoint using the pidfile

funcx.endpoint.endpoint.version_callback(value)

funcx.endpoint.list_endpoints module

funcx.endpoint.version module

Module contents