proxystore.endpoint.config¶
Endpoint configuration.
EndpointConfig
dataclass
¶
Endpoint configuration.
Attributes:
-
name
(
str
) –Endpoint name.
-
uuid
(
uuid.UUID
) –Endpoint UUID.
-
host
(
str | None
) –Host endpoint is running on.
-
port
(
int
) –Port endpoint is running on.
-
relay_server
(
str | None
) –Optional relay server the endpoint should register with.
-
database_path
(
str | None
) –Optional path to SQLite database file that will be used for storing endpoint data. If
None
, data will only be stored in-memory. -
max_object_size
(
int | None
) –Optional maximum object size.
-
peer_channels
(
int
) –Number of peer channels to multiplex communications over.
-
verify_certificates
(
int
) –Validate the SSL certificates of the
relay
server.
Raises:
-
ValueError
–If the name does not contain only alphanumeric, dash, or underscore characters, if the UUID cannot be parsed, or if the port is not in the range [1, 65535].
get_configs() ¶
Get all valid endpoint configurations in parent directory.
Parameters:
-
proxystore_dir
(
str
) –Parent directory containing possible endpoint configurations.
Returns:
-
list[EndpointConfig]
–List of found configs.
Source code in proxystore/endpoint/config.py
get_log_filepath() ¶
get_pid_filepath() ¶
read_config() ¶
Read endpoint config file.
Parameters:
-
endpoint_dir
(
str
) –Directory containing endpoint configuration file.
Returns:
-
EndpointConfig
–Config found in
endpoint_dir
.
Raises:
-
FileNotFoundError
–If a config files does not exist in the directory.
-
ValueError
–If config contains an invalid value or cannot be parsed.
Source code in proxystore/endpoint/config.py
validate_name() ¶
Validate name only contains alphanumeric or dash/underscore chars.
write_config() ¶
Write config to endpoint directory.
Parameters:
-
cfg
(
EndpointConfig
) –Configuration to write.
-
endpoint_dir
(
str
) –Directory to write config to.