| 3554afef Andy McCall ↶ |
1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
use crate::home::Home; |
| 6 |
use crate::microvm::{Outcome, Sink}; |
| 7 |
use anyhow::{bail, Result}; |
| 8 |
use flow_core::api::SecretInput; |
| 9 |
use flow_core::{Job, Sandbox}; |
| 10 |
use std::path::Path; |
| 11 |
use std::time::Duration; |
| 12 |
|
| 13 |
pub use crate::tier::disk_dir; |
| 14 |
pub(crate) use crate::tier::{lines, self_hash, FAILED}; |
| 15 |
|
| 16 |
const WHY: &str = "the syscall tier runs only on Linux"; |
| 17 |
|
| 18 |
pub fn available() -> std::result::Result<(), String> { |
| 19 |
Err(WHY.into()) |
| 20 |
} |
| 21 |
|
| 22 |
pub fn probe_main() -> i32 { |
| 23 |
eprintln!("{WHY}"); |
| 24 |
1 |
| 25 |
} |
| 26 |
|
| 27 |
pub fn sandbox_main(_spec_path: &Path) -> i32 { |
| 28 |
eprintln!("{WHY}"); |
| 29 |
125 |
| 30 |
} |
| 31 |
|
| 32 |
#[allow(clippy::too_many_arguments)] |
| 33 |
pub fn run( |
| 34 |
_home: &Home, |
| 35 |
_sandbox: &Sandbox, |
| 36 |
_job: &Job, |
| 37 |
_secrets: &[SecretInput], |
| 38 |
_workspace: &Path, |
| 39 |
_scratch: &Path, |
| 40 |
_timeout: Duration, |
| 41 |
_sink: &mut dyn Sink, |
| 42 |
_name: &str, |
| 43 |
) -> Result<Outcome> { |
| 44 |
bail!("{WHY}") |
| 45 |
} |