feat: implement Nginx service with upstream management and configuration generation
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
pub mod agent_client;
|
||||
pub mod auth;
|
||||
pub mod nginx;
|
||||
pub mod server_state;
|
||||
pub mod settings;
|
||||
|
||||
@@ -15,6 +16,7 @@ use crate::{
|
||||
authentication::{AuthenticationServiceImpl, strategies::password::PasswordStrategy},
|
||||
user::{UserService, UserServiceImpl},
|
||||
},
|
||||
nginx::NginxService,
|
||||
server_state::{ServerStateService, ServerStateStore},
|
||||
settings::{SettingsService, SettingsStore},
|
||||
},
|
||||
@@ -28,6 +30,8 @@ pub struct AppService {
|
||||
pub user: ServiceState<dyn UserService>,
|
||||
pub server_state: ServiceState<dyn ServerStateStore>,
|
||||
#[allow(dead_code)]
|
||||
pub nginx: ServiceState<NginxService>,
|
||||
#[allow(dead_code)]
|
||||
pub agent_client: ServiceState<agent_client::AgentService>,
|
||||
}
|
||||
|
||||
@@ -47,6 +51,7 @@ pub fn get_app_service(
|
||||
)),
|
||||
},
|
||||
user: Arc::new(UserServiceImpl::new(db_connection.clone())),
|
||||
nginx: Arc::new(NginxService::new(db_connection.clone())),
|
||||
agent_client: Arc::new(agent_client::AgentService::new(Configuration::from(
|
||||
settings.agent.clone(),
|
||||
))),
|
||||
|
||||
Reference in New Issue
Block a user