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 C97F070757 for ; Wed, 29 Sep 2021 09:04:22 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C5733F469 for ; Wed, 29 Sep 2021 09:04:22 +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 A403FF43A for ; Wed, 29 Sep 2021 09:04:21 +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 69DDA44B86 for ; Wed, 29 Sep 2021 09:04:21 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Wed, 29 Sep 2021 09:04:16 +0200 Message-Id: <20210929070420.617226-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.347 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] [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:04:22 -0000 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 -- 2.30.2