Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lffg committed Jun 14, 2024
1 parent 657cf64 commit 399880c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 2 additions & 3 deletions ctl/src/discovery/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(dead_code)]

use std::{collections::HashMap, net::SocketAddr};

use chrono::{DateTime, Utc};
Expand All @@ -12,11 +14,8 @@ pub struct Discovery {
rx: mpsc::Receiver<Msg>,
// TODO: Add more information on workers
workers: HashMap<SocketAddr, Metrics>,
#[allow(dead_code)]
services: HashMap<ServiceId, ServiceInfo>,
#[allow(dead_code)]
instances: HashMap<InstanceId, InstanceInfo>,
#[allow(dead_code)]
deployments: HashMap<DeploymentId, DeploymentInfo>,
}

Expand Down
3 changes: 2 additions & 1 deletion ctl/src/http/deployer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ use proto::ctl::deployer::{DeployReq, DeployRes};
use crate::http::HttpState;

pub async fn deploy(
State(_state): State<HttpState>,
State(state): State<HttpState>,
Json(_payload): Json<DeployReq>,
) -> Json<DeployRes> {
_ = state.discovery;
todo!();
}
1 change: 1 addition & 0 deletions worker/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use clap::{value_parser, Parser};
#[derive(Debug)]
pub struct WorkerArgs {
/// Controller's address.
#[allow(dead_code)]
pub controller_addr: SocketAddr,

/// Interval at which metrics are pushed to the controller.
Expand Down
3 changes: 2 additions & 1 deletion worker/src/http/runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ use proto::worker::runner::{DeployInstanceReq, DeployInstanceRes};
use crate::http::HttpState;

pub async fn new_instance(
State(_state): State<HttpState>,
State(state): State<HttpState>,
Json(_payload): Json<DeployInstanceReq>,
) -> Json<DeployInstanceRes> {
_ = state.runner;
todo!();
}

0 comments on commit 399880c

Please sign in to comment.