forked from lavina/lavina
1
0
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
Nikita Vilunov 825d41fa3a fmt 2024-05-11 14:48:30 +02:00
Nikita Vilunov 2fa1ddb7e6 un-arc cluster metadata 2024-05-11 14:48:08 +02:00
4 changed files with 5 additions and 9 deletions

View File

@ -65,7 +65,7 @@ pub struct Services {
pub(crate) broadcasting: Broadcasting,
pub(crate) client: LavinaClient,
pub(crate) storage: Storage,
pub(crate) cluster_metadata: Arc<ClusterMetadata>,
pub(crate) cluster_metadata: ClusterMetadata,
}
impl LavinaCore {
@ -88,7 +88,7 @@ impl LavinaCore {
broadcasting,
client,
storage,
cluster_metadata: Arc::new(cluster_config.metadata),
cluster_metadata: cluster_config.metadata,
};
Ok(LavinaCore {

View File

@ -2,8 +2,8 @@
use quick_xml::events::Event;
use lavina_core::LavinaCore;
use lavina_core::room::RoomId;
use lavina_core::LavinaCore;
use proto_xmpp::bind::{BindRequest, BindResponse, Jid, Name, Server};
use proto_xmpp::client::{Iq, IqError, IqErrorType, IqType};
use proto_xmpp::disco::{Feature, Identity, InfoQuery, Item, ItemQuery};

View File

@ -85,9 +85,9 @@ impl<'a> XmppConnection<'a> {
#[cfg(test)]
mod tests {
use anyhow::Result;
use crate::testkit::{expect_user_authenticated, TestServer};
use crate::Authenticated;
use anyhow::Result;
use lavina_core::player::PlayerId;
use proto_xmpp::bind::{Jid, Name, Resource, Server};
use proto_xmpp::client::Presence;

View File

@ -29,11 +29,7 @@ pub struct ServerConfig {
pub listen_on: SocketAddr,
}
pub async fn launch(
config: ServerConfig,
metrics: MetricsRegistry,
core: LavinaCore,
) -> Result<Terminator> {
pub async fn launch(config: ServerConfig, metrics: MetricsRegistry, core: LavinaCore) -> Result<Terminator> {
log::info!("Starting the http service");
let listener = TcpListener::bind(config.listen_on).await?;
log::debug!("Listener started");