]> git.proxmox.com Git - proxmox-backup.git/commit
rest-server: use hypers AddrIncoming for proxmox-backup-api
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 29 Sep 2021 07:04:17 +0000 (09:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 29 Sep 2021 07:38:40 +0000 (09:38 +0200)
commit6f0565fa60d597d2b3d25a5e69a4a8730629c4f2
treea1797abccd32978f93dc488cf9060f93857fc9b0
parent99940358e34fdc4993a036163e23567b4d36386e
rest-server: use hypers AddrIncoming for proxmox-backup-api

this has a 'from_listener' (tokio::net::TcpListener) since hyper 0.14.5 in
the 'tcp' feature (we use 'full', which includes that; since 0.14.13
it is not behind a feature flag anymore).

this makes it possible to create a hyper server without our
'StaticIncoming' wrapper and thus makes it unnecessary.

The only other thing we have to do is to change the Service impl from
tokio::net::TcpStream to hyper::server::conn::AddStream to fulfill the trait
requirements.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-rest-server/Cargo.toml
proxmox-rest-server/src/rest.rs
src/bin/proxmox-backup-api.rs