Features
- (experimental) Add
agrpc::register_coroutine_rpc_handler
, a generic version of agrpc::register_awaitable_rpc_handler
that can be used to handle RPCs with all kinds of awaitable types like asio::experimental::coro
and boost::cobalt::task
. This can, for example, be used to implement async generator style rpc handler:
asio::experimental::coro<const example::v1::Response*, grpc::Status>
handle_server_streaming_request(agrpc::GrpcExecutor executor, example::v1::Request& request)
{
example::v1::Response response;
response.set_integer(request.integer());
agrpc::Alarm alarm{executor};
for (size_t i{}; i != 5; ++i)
{
response.set_integer(response.integer() + 1);
co_yield &response;
co_await alarm.wait(std::chrono::system_clock::now() + std::chrono::seconds(1));
}
co_return grpc::Status::OK;
}
Fixes
- Fix compilation of
health_check_service.hpp
with recent gRPC versions by removing use of GPR_ASSERT
macro.
Documentation
- Code snippets now have a copy button in the top right corner.
- Improve several links between classes/functions in the documentation.
- Document
agrpc::DefaultServerRPCTraits
.
- Fix empty documentation of
agrpc::ClientRPC<GENERIC_STREAMING>
and agrpc::ServerRPC<GENERIC>
.
Chore
- Replace Clang 12 build with Clang 18.
- Update doxygen to 1.12.0 and doxygen-awesome to 2.3.4.
- Update vcpkg, includes Boost 1.86 update.