From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup] examples: add example for a simple rest server with a small api
Date: Mon, 27 Sep 2021 09:15:16 +0200 [thread overview]
Message-ID: <4b112c23-70c2-6be9-87f9-3bd03f02ae65@proxmox.com> (raw)
In-Reply-To: <20210922110553.3720628-1-d.csapak@proxmox.com>
On 22.09.21 13:05, Dominik Csapak wrote:
> show how to generally start a daemon that serves a rest api + index page
>
> api calls are:
> / GET listing
> /ping GET returns "pong"
> /items GET lists existing items
> POST lets user create new items
> /items/{id} GET returns the content of a single item
> PUT updates an item
> DELETE deletes an item
>
> Contains a small dummy user/authinfo
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> examples/rest_server.rs | 219 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 219 insertions(+)
> create mode 100644 examples/rest_server.rs
looks OK, I like that it's really not much code!
But, I'd like to have this as example in the rest-server crate and not in the top-level
proxmox-backup crate thingy, as we know that we do not want to keep that as crate but
only as plain workspace and the example also better fits into rest-server.
Currently we'd only need to move the `proxmox_backup::tools::async_io::StaticIncoming`
(together with some other tokio adapters) in a new crate to solve that, maybe Dietmar
or Wolfgang have already a concrete idea/plan for that.
prev parent reply other threads:[~2021-09-27 7:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 11:05 Dominik Csapak
2021-09-27 7:15 ` Thomas Lamprecht [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b112c23-70c2-6be9-87f9-3bd03f02ae65@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.