Provide fxrunner host as a string

This allows us to specify a hostname instead of just an IP address.
This commit is contained in:
Barret Rennie 2021-06-14 23:45:23 -04:00
Родитель 7a063ee83b
Коммит 7d334fee85
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4D71D86C09132D72
2 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -131,7 +131,7 @@ async fn record(
let session_id = {
let stream = TcpStream::connect(&config.host).await?;
info!(log, "Connected"; "peer" => config.host);
info!(log, "Connected"; "peer" => &config.host);
// TODO: Ideally we would split new_session and resume_session into
// static methods so that we do not need to specify the recorder here.
@ -170,7 +170,7 @@ async fn record(
e
})?;
info!(log, "Re-connected"; "peer" => config.host);
info!(log, "Re-connected"; "peer" => &config.host);
let mut proto = RecorderProto::new(
log.clone(),

Просмотреть файл

@ -2,7 +2,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
use std::net::SocketAddr;
use std::path::PathBuf;
use serde::Deserialize;
@ -11,7 +10,7 @@ use serde::Deserialize;
#[derive(Debug, Deserialize)]
pub struct Config {
/// The address of the `fxrunner` to connect to.
pub host: SocketAddr,
pub host: String,
/// The path to the `visualmetrics.py` script.
pub visual_metrics_path: PathBuf,