all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup v2 0/3] add rest_server example
@ 2021-09-28  9:11 Dominik Csapak
  2021-09-28  9:11 ` [pbs-devel] [PATCH proxmox-backup v2 1/3] rest-server: use hypers AddrStream for proxmox-backup-api Dominik Csapak
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Dominik Csapak @ 2021-09-28  9:11 UTC (permalink / raw)
  To: pbs-devel

adds a rest_server example to the proxmox-rest-server crate.

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 (3):
  rest-server: use hypers AddrStream for proxmox-backup-api
  remove tools/async_io.rs
  examples: add example for a simple rest server with a small api

 proxmox-rest-server/Cargo.toml              |   5 +
 proxmox-rest-server/examples/rest_server.rs | 219 ++++++++++++++++++++
 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, 234 insertions(+), 95 deletions(-)
 create mode 100644 proxmox-rest-server/examples/rest_server.rs
 delete mode 100644 src/tools/async_io.rs

-- 
2.30.2





^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup v2 3/3] examples: add example for a simple rest server with a small api
@ 2021-09-29  5:19 Dietmar Maurer
  0 siblings, 0 replies; 7+ messages in thread
From: Dietmar Maurer @ 2021-09-29  5:19 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Dominik Csapak

Is it possible to avoid the dev-dependency to pbs-runtime?

(We want to split out proxmox-rest-server, so we cannot use 'pbs-runtime')

> diff --git a/proxmox-rest-server/Cargo.toml b/proxmox-rest-server/Cargo.toml
> index b0e53d19..a6d25b8b 100644
> --- a/proxmox-rest-server/Cargo.toml
> +++ b/proxmox-rest-server/Cargo.toml
> @@ -5,6 +5,11 @@ authors = ["Proxmox Support Team <support@proxmox.com>"]
>  edition = "2018"
>  description = "REST server implementation"
>  
> +# for example
> +[dev-dependencies]
> +proxmox = { version = "0.13.4", features = ["router","api-macro"] }
> +pbs-runtime = { path = "../pbs-runtime" }




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-29  6:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28  9:11 [pbs-devel] [PATCH proxmox-backup v2 0/3] add rest_server example Dominik Csapak
2021-09-28  9:11 ` [pbs-devel] [PATCH proxmox-backup v2 1/3] rest-server: use hypers AddrStream for proxmox-backup-api Dominik Csapak
2021-09-29  6:27   ` Thomas Lamprecht
2021-09-28  9:11 ` [pbs-devel] [PATCH proxmox-backup v2 2/3] remove tools/async_io.rs Dominik Csapak
2021-09-28  9:11 ` [pbs-devel] [PATCH proxmox-backup v2 3/3] examples: add example for a simple rest server with a small api Dominik Csapak
2021-09-29  6:41   ` Thomas Lamprecht
2021-09-29  5:19 Dietmar Maurer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal