From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 83C7970837 for ; Wed, 29 Sep 2021 09:50:53 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7594E10186 for ; Wed, 29 Sep 2021 09:50:23 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 894ED10178 for ; Wed, 29 Sep 2021 09:50:22 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 5E8C544B3C for ; Wed, 29 Sep 2021 09:50:16 +0200 (CEST) Message-ID: <8ef4412a-fc57-77ff-763d-f9d8ea748e45@proxmox.com> Date: Wed, 29 Sep 2021 09:49:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Thunderbird/93.0 Content-Language: en-US To: Proxmox Backup Server development discussion , Dominik Csapak References: <20210929070420.617226-1-d.csapak@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210929070420.617226-1-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.241 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] applied-series: [PATCH proxmox-backup v3 0/3] add rest_server example X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2021 07:50:53 -0000 On 29.09.21 09:04, Dominik Csapak wrote: > adds a rest_server example to the proxmox-rest-server crate. > > changes from v2: > * don't use pbs_runtime, but use a stock tokio runtime (cuts the > pbs-runtime dependency) > * improve commit messages (explain hyper addrincoming, and api call > paths) > * use proxmox "0.13" dev-dependency instead of "0.13.5" > * use explicit hyper version dependency (0.14.5) > > changes from v1: > * added patches so we can remove the (now) unused srt/tools/async_io.rs. > this enables us to don't have any dependencies on the top-level crate > for the example, and we can move it into proxmox-rest-server > * use hypers AddrStream for the example > > Dominik Csapak (4): > rest-server: use hypers AddrIncoming for proxmox-backup-api > remove tools/async_io.rs > examples: add example for a simple rest server with a small api > fixup! rest-server: use hypers AddrIncoming for proxmox-backup-api > > proxmox-rest-server/Cargo.toml | 7 +- > proxmox-rest-server/examples/rest_server.rs | 220 ++++++++++++++++++++ > proxmox-rest-server/src/rest.rs | 18 +- > src/bin/proxmox-backup-api.rs | 3 +- > src/tools/async_io.rs | 83 -------- > src/tools/mod.rs | 1 - > 6 files changed, 236 insertions(+), 96 deletions(-) > create mode 100644 proxmox-rest-server/examples/rest_server.rs > delete mode 100644 src/tools/async_io.rs > applied, thanks! FYI: I `rebase --fixup`'d the series and renamed the example to minimal-rest-server for now.