funcx.endpoint package


funcx.endpoint.auth module


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_FILE = '/home/docs/.funcx/'
FUNCX_DEFAULT_CONFIG_TEMPLATE = '/home/docs/checkouts/'
FUNCX_DIR = '/home/docs/.funcx'
funcx.endpoint.endpoint.check_pidfile(filepath, match_name, endpoint_name)

Helper function to identify possible dead endpoints


Entry point for setuptools to point to

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

Configure an endpoint

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

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

Deletes an endpoint and its config.


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 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

  • 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

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.

  • 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='')

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 +—————–+

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

Stops an endpoint using the pidfile


funcx.endpoint.list_endpoints module

funcx.endpoint.version module

Module contents