pub async fn start_rcs(email: &str, config: &Config) -> Authority
Expand description
Idempotently starts the rust-code-server instance for the use
identified by their email. Returns the an Authority
specifying
the host and port of the server instance.
On first run:
-
a volume named by the
email
(transliterated
) is created -
then a rust-code-server container is started which mounts the volume into
/home/workspace
. The container publishes a random port for connecting to the vscode (returned in theAuthority
). The container’s name the same as the volume’s.
§Panics
The function will panic if:
-
the
Config::socket_path
is invalid -
it cannot connect to the socket
-
it cannot create the volume or the container