]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
neorados: Add Asio-idiomatic watch support
authorAdam Emerson <aemerson@redhat.com>
Fri, 15 Sep 2023 20:08:51 +0000 (16:08 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Tue, 1 Apr 2025 15:10:13 +0000 (11:10 -0400)
commit9b395c8a237f47be40a00a9ca193f33d46900181
treeb959b08c733eefffc454f36c1dd30552885ffb24
parent7d10b8d61c2cc579bd1dd2851f5e19b7fd3ca94c
neorados: Add Asio-idiomatic watch support

In addition to the librados-style callback function, add a variant of
`RADOS::watch` and a `next_notification` function that retrieves the
next notification.

Rationale:

The callback creates an inversion of control that was more noticeable
with coroutine heavy workflows. You could co_spawn and detach, but
even then there isn't an obvious way to report errors.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
src/include/neorados/RADOS.hpp
src/neorados/RADOS.cc
src/osdc/Objecter.h
src/test/neorados/watch_notify.cc