forked from DGNum/colmena
Added support for remote and local realization
This commit is contained in:
parent
eca9e7a425
commit
9b530b6ff6
1 changed files with 22 additions and 0 deletions
|
@ -53,6 +53,7 @@ pub enum Request {
|
||||||
/// Realizes the derivation
|
/// Realizes the derivation
|
||||||
Realize {
|
Realize {
|
||||||
path: StorePath,
|
path: StorePath,
|
||||||
|
remote: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
/// Uploads keys to host
|
/// Uploads keys to host
|
||||||
|
@ -116,6 +117,27 @@ impl Host for GenericHost {
|
||||||
.call(
|
.call(
|
||||||
Request::Realize {
|
Request::Realize {
|
||||||
path: derivation.clone(),
|
path: derivation.clone(),
|
||||||
|
remote: true
|
||||||
|
},
|
||||||
|
move |response, mut store_paths| {
|
||||||
|
match response {
|
||||||
|
Response::Progress { phase } => println!("{}", phase),
|
||||||
|
Response::NewStorePath { store_path } => store_paths.push(store_path),
|
||||||
|
_ => (),
|
||||||
|
};
|
||||||
|
store_paths
|
||||||
|
},
|
||||||
|
Vec::new(),
|
||||||
|
)
|
||||||
|
.await?)
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn realize(&mut self, derivation: &StorePath) -> ColmenaResult<Vec<StorePath>> {
|
||||||
|
Ok(self
|
||||||
|
.call(
|
||||||
|
Request::Realize {
|
||||||
|
path: derivation.clone(),
|
||||||
|
remote: false
|
||||||
},
|
},
|
||||||
move |response, mut store_paths| {
|
move |response, mut store_paths| {
|
||||||
match response {
|
match response {
|
||||||
|
|
Loading…
Reference in a new issue