mirror of
https://github.com/faas-rs/faasd-in-rust.git
synced 2025-06-18 03:56:34 +00:00
1
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
pub mod spec;
|
||||
|
||||
use containerd_client::{
|
||||
Client,
|
||||
services::v1::{
|
||||
container::Runtime,
|
||||
snapshots::{MountsRequest, PrepareSnapshotRequest},
|
||||
@ -19,16 +18,6 @@ use sha2::{Digest, Sha256};
|
||||
use spec::generate_spec;
|
||||
use std::{
|
||||
fs,
|
||||
Container, CreateContainerRequest, CreateTaskRequest, DeleteContainerRequest,
|
||||
DeleteTaskRequest, KillRequest, ListContainersRequest, ListTasksRequest, StartRequest,
|
||||
WaitRequest, container::Runtime,
|
||||
},
|
||||
tonic::Request,
|
||||
with_namespace,
|
||||
};
|
||||
|
||||
use std::{
|
||||
fs::{self, File},
|
||||
sync::{Arc, Mutex},
|
||||
time::Duration,
|
||||
};
|
||||
@ -36,7 +25,6 @@ use tokio::time::timeout;
|
||||
|
||||
// config.json,dockerhub密钥
|
||||
// const DOCKER_CONFIG_DIR: &str = "/var/lib/faasd/.docker/";
|
||||
|
||||
// 命名空间(容器的)
|
||||
const NAMESPACE: &str = "default";
|
||||
|
||||
@ -536,4 +524,4 @@ impl Service {
|
||||
}
|
||||
}
|
||||
//容器是容器,要先启动,然后才能运行任务
|
||||
//要想删除一个正在运行的Task,必须先kill掉这个task,然后才能删除。
|
||||
//要想删除一个正在运行的Task,必须先kill掉这个task,然后才能删除。
|
Reference in New Issue
Block a user