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 | None,
relay_server: str | None,
relay_auth: bool = True,
proxystore_dir: str | None = None,
peer_channels: int = 1,
persist_data: bool = False,
use_fqdn: bool = True
) -> int
Configure a new endpoint.
Parameters:
-
name
(str
) –Name of endpoint.
-
port
(int | None
) –Port for endpoint to listen on. If
None
, a random port is selected. -
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.
-
use_fqdn
(bool
, default:True
) –Use the FQDN, rather than IP address, for client connections to 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
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
|
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
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 346 347 348 349 350 351 352 353 354 355 356 357 358 |
|
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.