feat: update with web assembly components
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -4,7 +4,8 @@ use crate::api::Discovery;
|
||||
|
||||
use super::{
|
||||
config::AgentConfig, discovery_client::DiscoveryClient, grpc_client::GrpcClient,
|
||||
handlers::scheduled_tasks::ScheduledTasks, queue::AgentQueue, scheduler::Scheduler,
|
||||
handlers::scheduled_tasks::ScheduledTasks, plugins::PluginStore, queue::AgentQueue,
|
||||
scheduler::Scheduler,
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -35,6 +36,7 @@ pub struct State {
|
||||
pub config: AgentConfig,
|
||||
pub discovery: Discovery,
|
||||
pub queue: AgentQueue,
|
||||
pub plugin_store: PluginStore,
|
||||
}
|
||||
|
||||
impl State {
|
||||
@@ -42,7 +44,8 @@ impl State {
|
||||
let config = AgentConfig::new().await?;
|
||||
let discovery = DiscoveryClient::new(&config.discovery).discover().await?;
|
||||
let grpc = GrpcClient::new(&discovery.process_host);
|
||||
let scheduled_tasks = ScheduledTasks::new();
|
||||
let plugin_store = PluginStore::new()?;
|
||||
let scheduled_tasks = ScheduledTasks::new(plugin_store.clone());
|
||||
let scheduler = Scheduler::new(scheduled_tasks);
|
||||
let queue = AgentQueue::new(scheduler);
|
||||
|
||||
@@ -51,6 +54,7 @@ impl State {
|
||||
config,
|
||||
discovery,
|
||||
queue,
|
||||
plugin_store,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user