]>
git.proxmox.com Git - proxmox-backup.git/blob - src/server.rs
aa4b57ec6417fadbeef82732723075b9d96986e8
1 //! Proxmox Server/Service framework
3 //! This code provides basic primitives to build our REST API
4 //! services. We want async IO, so this is built on top of
7 use lazy_static
::lazy_static
;
10 use proxmox
::sys
::linux
::procfs
::PidStat
;
15 static ref PID
: i32 = unsafe { libc::getpid() }
;
16 static ref PSTART
: u64 = PidStat
::read_from_pid(Pid
::from_raw(*PID
)).unwrap().starttime
;
23 pub fn pstart() -> u64 {
27 pub fn ctrl_sock_from_pid(pid
: i32) -> String
{
28 format
!("\0{}/control-{}.sock", buildcfg
::PROXMOX_BACKUP_RUN_DIR
, pid
)
31 pub fn our_ctrl_sock() -> String
{
32 ctrl_sock_from_pid(*PID
)
36 pub use environment
::*;
45 pub use command_socket
::*;
48 pub use worker_task
::*;
64 pub use verify_job
::*;
72 mod email_notifications
;
73 pub use email_notifications
::*;