mirror of
https://github.com/maplibre/martin.git
synced 2024-12-19 12:51:37 +03:00
5a807e40e2
* test: 💍 add function sources tests * test: 💍 limit postgres pool size in tests * feat: 🎸 upgrade actix-web to 1.0
52 lines
1.0 KiB
Rust
Executable File
52 lines
1.0 KiB
Rust
Executable File
use actix::{Addr, Message};
|
|
use std::io;
|
|
|
|
use crate::function_source::FunctionSources;
|
|
use crate::source::{Query, Source, Tile, XYZ};
|
|
use crate::table_source::TableSources;
|
|
use crate::worker_actor::WorkerActor;
|
|
|
|
pub struct Connect {
|
|
pub addr: Addr<WorkerActor>,
|
|
}
|
|
|
|
impl Message for Connect {
|
|
type Result = Addr<WorkerActor>;
|
|
}
|
|
|
|
pub struct GetTile {
|
|
pub xyz: XYZ,
|
|
pub query: Option<Query>,
|
|
pub source: Box<dyn Source + Send>,
|
|
}
|
|
|
|
impl Message for GetTile {
|
|
type Result = Result<Tile, io::Error>;
|
|
}
|
|
|
|
pub struct GetTableSources {}
|
|
impl Message for GetTableSources {
|
|
type Result = Result<TableSources, io::Error>;
|
|
}
|
|
|
|
pub struct GetFunctionSources {}
|
|
impl Message for GetFunctionSources {
|
|
type Result = Result<FunctionSources, io::Error>;
|
|
}
|
|
|
|
pub struct RefreshTableSources {
|
|
pub table_sources: Option<TableSources>,
|
|
}
|
|
|
|
impl Message for RefreshTableSources {
|
|
type Result = ();
|
|
}
|
|
|
|
pub struct RefreshFunctionSources {
|
|
pub function_sources: Option<FunctionSources>,
|
|
}
|
|
|
|
impl Message for RefreshFunctionSources {
|
|
type Result = ();
|
|
}
|