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

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

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

Configure an endpoint

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

Parameters:
  • 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
funcx.endpoint.endpoint.init_endpoint(args)

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

Initialize a clean endpoint dir

Returns if an endpoint_dir already exists

Parameters:
  • 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
funcx.endpoint.endpoint.load_endpoint(endpoint_dir)
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.

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

Parameters:
  • 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

Parameters:
  • args
  • global_config

funcx.endpoint.list_endpoints module

funcx.endpoint.list_endpoints.list_endpoints(args)

List all available endpoints

funcx.endpoint.version module

Module contents