proxystore.endpoint.commands¶
Endpoint management commands.
These are the implementations of the commands available via the
proxystore-endpoint
command.
Subsequently, all commands log errors and results and return status codes
(rather than raising errors and returning results).
EndpointStatus
¶
get_status
¶
get_status(
name: str, proxystore_dir: str | None = None
) -> EndpointStatus
Check status of endpoint.
Parameters:
-
name
(str
) –Name of endpoint to check.
-
proxystore_dir
(str | None
, default:None
) –Optionally specify the proxystore home directory. Defaults to
home_dir()
.
Returns:
-
EndpointStatus
–EndpointStatus.RUNNING
if the endpoint has a valid directory and the PID file points to a running process.EndpointStatus.STOPPED
if the endpoint has a valid directory and no PID file.EndpointStatus.UNKNOWN
if the endpoint directory is missing or the config file is missing/unreadable.EndpointStatus.HANGING
if the endpoint has a valid directory but the PID file does not point to a running process. This can be due to the endpoint process dying unexpectedly or the endpoint process is on a different host.
Source code in proxystore/endpoint/commands.py
configure_endpoint
¶
configure_endpoint(
name: str,
*,
port: int,
relay_server: str | None,
relay_auth: bool = True,
proxystore_dir: str | None = None,
peer_channels: int = 1,
persist_data: bool = False
) -> int
Configure a new endpoint.
Parameters:
-
name
(str
) –Name of endpoint.
-
port
(int
) –Port for endpoint to listen on.
-
relay_server
(str | None
) –Optional relay server address for P2P endpoint connections.
-
relay_auth
(bool
, default:True
) –Relay server used Globus Auth.
-
proxystore_dir
(str | None
, default:None
) –Optionally specify the proxystore home directory. Defaults to
home_dir()
. -
peer_channels
(int
, default:1
) –Number of datachannels per peer connection to another endpoint to communicate over.
-
persist_data
(bool
, default:False
) –Persist data stored in the endpoint.
Returns:
-
int
–Exit code where 0 is success and 1 is failure. Failure messages are logged to the default logger.
Source code in proxystore/endpoint/commands.py
list_endpoints
¶
List available endpoints.
Parameters:
-
proxystore_dir
(str | None
, default:None
) –Optionally specify the proxystore home directory. Defaults to
home_dir()
.
Returns:
-
int
–Exit code where 0 is success and 1 is failure. Failure messages are logged to the default logger.
Source code in proxystore/endpoint/commands.py
remove_endpoint
¶
Remove endpoint.
Parameters:
-
name
(str
) –Name of endpoint to remove.
-
proxystore_dir
(str | None
, default:None
) –Optionally specify the proxystore home directory. Defaults to
home_dir()
.
Returns:
-
int
–Exit code where 0 is success and 1 is failure. Failure messages are logged to the default logger.
Source code in proxystore/endpoint/commands.py
start_endpoint
¶
start_endpoint(
name: str,
*,
detach: bool = False,
log_level: str = "INFO",
proxystore_dir: str | None = None
) -> int
Start endpoint.
Parameters:
-
name
(str
) –Name of endpoint to start.
-
detach
(bool
, default:False
) –Start the endpoint as a daemon process.
-
log_level
(str
, default:'INFO'
) –Logging level of the endpoint.
-
proxystore_dir
(str | None
, default:None
) –Optionally specify the proxystore home directory. Defaults to
home_dir()
.
Returns:
-
int
–Exit code where 0 is success and 1 is failure. Failure messages are logged to the default logger.
Source code in proxystore/endpoint/commands.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
|
stop_endpoint
¶
Stop endpoint.
Parameters:
-
name
(str
) –Name of endpoint to start.
-
proxystore_dir
(str | None
, default:None
) –Optionally specify the proxystore home directory. Defaults to
home_dir()
.
Returns:
-
int
–Exit code where 0 is success and 1 is failure. Failure messages are logged to the default logger.