Skip to main content

run

Function run 

Source
pub async fn run(config: Config) -> Result<(), Error>
Expand description

Runs the media relay server until a shutdown signal or an error.

The first SIGINT or SIGTERM drains the browser sessions, and a second one ends the media relay at once. It runs iroh and moq-relay on iroh_live_node::crypto_provider, the backend the crypto-* features select, or on a provider the process installed before. The media relay prints its endpoint id and the addresses it listens at to stdout, for an operator and for the browser tests.

§Errors

Fails with Error::NoDataDir or Error::Identity if the media relay’s identity cannot be loaded, Error::Bind if the iroh endpoint cannot bind, Error::Keys if the JWT keys cannot be read, and Error::Relay if the media relay cannot start or one of its listeners fails.