/* Copyright The containerd Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #![allow(unused)] use std::env; use std::path::{Path, PathBuf}; use path_absolutize::*; use tempfile::{Builder, NamedTempFile}; use uuid::Uuid; use crate::error::Error; // constants for flags pub const ALL: &str = "--all"; pub const CONSOLE_SOCKET: &str = "--console-socket"; // pub const CRIU: &str = "--criu"; pub const DEBUG: &str = "--debug"; pub const DETACH: &str = "--detach"; pub const FORCE: &str = "--force"; pub const LOG: &str = "--log"; pub const LOG_FORMAT: &str = "--log-format"; pub const NO_NEW_KEYRING: &str = "--no-new-keyring"; pub const NO_PIVOT: &str = "--no-pivot"; pub const PID_FILE: &str = "--pid-file"; pub const ROOT: &str = "--root"; pub const ROOTLESS: &str = "--rootless"; pub const SYSTEMD_CGROUP: &str = "--systemd-cgroup"; // constants for log format pub const JSON: &str = "json"; pub const TEXT: &str = "text"; // constant for command pub const DEFAULT_COMMAND: &str = "runc"; // helper to resolve path (such as path for runc binary, pid files, etc. ) pub fn abs_path_buf
(path: P) -> Result (path: P) -> Result (path: P) -> Option