forked from kemitix/git-next
feat(server/actors): create stub RepoActor
This commit is contained in:
parent
3ac4894d68
commit
eacefefe20
3 changed files with 25 additions and 0 deletions
1
src/server/actors/mod.rs
Normal file
1
src/server/actors/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod repo;
|
23
src/server/actors/repo.rs
Normal file
23
src/server/actors/repo.rs
Normal file
|
@ -0,0 +1,23 @@
|
|||
use actix::prelude::*;
|
||||
use tracing::info;
|
||||
|
||||
use crate::server::config::RepoDetails;
|
||||
|
||||
pub struct RepoActor {
|
||||
pub defailt: RepoDetails,
|
||||
}
|
||||
impl Actor for RepoActor {
|
||||
type Context = Context<Self>;
|
||||
}
|
||||
#[derive(Message)]
|
||||
#[rtype(result = "()")]
|
||||
pub struct StartRepo;
|
||||
impl Handler<StartRepo> for RepoActor {
|
||||
type Result = ();
|
||||
fn handle(&mut self, _msg: StartRepo, _ctx: &mut Self::Context) -> Self::Result {
|
||||
info!(
|
||||
"Starting Repo: {} - {}",
|
||||
self.defailt.name.0, self.defailt.path.0
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
mod actors;
|
||||
mod config;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
|
Loading…
Reference in a new issue