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 ¶
Check status of endpoint.
Parameters:
-
name
(
str
) –Name of endpoint to check.
-
proxystore_dir
(
str | 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,
server: str | None,
proxystore_dir: str | None = None,
max_memory: int | None = None,
dump_dir: str | None = None,
peer_channels: int = 1
) -> int
Configure a new endpoint.
Parameters:
-
name
(
str
) –Name of endpoint.
-
port
(
int
) –Port for endpoint to listen on.
-
server
(
str | None
) –Optional address of signaling server for P2P endpoint connections.
-
proxystore_dir
(
str | None
) –Optionally specify the proxystore home directory. Defaults to
home_dir()
. -
max_memory
(
int | None
) –Optional max memory in bytes to use for storing objects. If exceeded, LRU objects will be dumped to
dump_dir
. -
dump_dir
(
str | None
) –Optional directory to dump objects to if the memory limit is exceeded.
-
peer_channels
(
int
) –Number of datachannels per peer connection to another endpoint to communicate over.
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
) –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
) –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
) –Start the endpoint as a daemon process.
-
log_level
(
str
) –Logging level of the endpoint.
-
proxystore_dir
(
str | 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
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 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 |
|
stop_endpoint ¶
Stop endpoint.
Parameters:
-
name
(
str
) –Name of endpoint to start.
-
proxystore_dir
(
str | 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.