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 ¶
Endpoint status.
RUNNING
class-attribute
instance-attribute
¶
Endpoint is running on this host.
UNKNOWN
class-attribute
instance-attribute
¶
Endpoint cannot be found (missing/corrupted directory).
HANGING
class-attribute
instance-attribute
¶
Endpoint PID file exists but process is not active.
This is either because the process died unexpectedly or the endpoint is running on another host.
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,
relay_server: str | None,
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.
-
proxystore_dir
(
str | None
) –Optionally specify the proxystore home directory. Defaults to
home_dir()
. -
peer_channels
(
int
) –Number of datachannels per peer connection to another endpoint to communicate over.
-
persist_data
(
bool
) –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
) –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
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 313 |
|
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.