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

funcx.endpoint.endpoint.check_pidfile(filepath, match_name, endpoint_name)

Helper function to identify possible dead endpoints


Entry point for funcx-endpoint

funcx.endpoint.endpoint.configure_endpoint(args, config_file=None, global_config=None)

Configure an endpoint

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

  • args (args object) – Args object from the arg parsing
  • config_file (str) – Path to a config file to be used instead of the funcX default config file
  • global_config (dict) – Global config dict

Setup funcx dirs and config files including a default endpoint config

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(funcx_dir, endpoint_name, config_file=None)

Initialize a clean endpoint dir

Returns if an endpoint_dir already exists

  • funcx_dir (str) – Path to the funcx_dir on the system
  • endpoint_name (str) – Name of the endpoint, which will be used to name the dir for the endpoint.
  • config_file (str) – Path to a config file to be used instead of the funcX default config file
Parameters:endpoint_dir (str) – endpoint directory path within funcx_dir
funcx.endpoint.endpoint.register_endpoint(funcx_client, endpoint_name, endpoint_uuid, 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.start_endpoint(args, global_config=None)

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

  • args (args object) – Args object from the arg parsing
  • global_config (dict) – Global config dict
funcx.endpoint.endpoint.stop_endpoint(args, global_config=None)

Stops an endpoint using the pidfile

  • args
  • global_config

funcx.endpoint.list_endpoints module


List all available endpoints

funcx.endpoint.version module

Module contents