Skip to content

Commit

Permalink
doc: De-experimentalize v3 API and remove unused cpp20 namespace macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Tradias committed Feb 9, 2024
1 parent 46b31dc commit 7d8e33e
Show file tree
Hide file tree
Showing 19 changed files with 40 additions and 103 deletions.
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
NamespaceMacros:
- AGRPC_NAMESPACE_BEGIN
- AGRPC_NAMESPACE_CPP20_BEGIN
- DOCTEST_TEST_SUITE
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
Expand Down
2 changes: 1 addition & 1 deletion example/snippets/alarm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ asio::awaitable<void> timer_with_different_completion_tokens(agrpc::GrpcContext&
[&](const asio::yield_context& yield)
{
agrpc::Alarm alarm{grpc_context};
alarm.wait(deadline, yield); // suspend coroutine until alarm fires
alarm.wait(deadline, yield); // suspend coroutine until alarm goes off
},
asio::detached);
/* [alarm-with-spawn] */
Expand Down
22 changes: 11 additions & 11 deletions src/agrpc/client_rpc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ AGRPC_NAMESPACE_BEGIN()
namespace detail
{
/**
* @brief (experimental) Unary ClientRPC base
* @brief Unary ClientRPC base
*
* @since 2.6.0
*/
Expand Down Expand Up @@ -193,7 +193,7 @@ class ClientRPCUnaryBase<PrepareAsyncUnary, Executor> : public detail::ClientRPC
}

/**
* @brief (experimental) I/O object for client-side, unary rpcs
* @brief I/O object for client-side, unary rpcs
*
* Example:
*
Expand Down Expand Up @@ -238,7 +238,7 @@ class ClientRPC<PrepareAsyncUnary, Executor> : public detail::ClientRPCUnaryBase
};

/**
* @brief (experimental) I/O object for client-side, generic, unary rpcs
* @brief I/O object for client-side, generic, unary rpcs
*
* Example:
*
Expand Down Expand Up @@ -384,7 +384,7 @@ class ClientRPC<agrpc::ClientRPCType::GENERIC_UNARY, Executor>
};

/**
* @brief (experimental) I/O object for client-side, generic, unary rpcs (type alias)
* @brief I/O object for client-side, generic, unary rpcs (type alias)
*
* @see agrpc::ClientRPC<agrpc::ClientRPCType::GENERIC_UNARY,Executor>
*
Expand All @@ -393,7 +393,7 @@ class ClientRPC<agrpc::ClientRPCType::GENERIC_UNARY, Executor>
using GenericUnaryClientRPC = agrpc::ClientRPC<agrpc::ClientRPCType::GENERIC_UNARY>;

/**
* @brief (experimental) I/O object for client-side, client-streaming rpcs
* @brief I/O object for client-side, client-streaming rpcs
*
* Example:
*
Expand Down Expand Up @@ -618,7 +618,7 @@ class ClientRPC<PrepareAsyncClientStreaming, Executor> : public detail::ClientRP
namespace detail
{
/**
* @brief (experimental) Server-streaming ClientRPC base
* @brief Server-streaming ClientRPC base
*
* @since 2.6.0
*/
Expand Down Expand Up @@ -781,7 +781,7 @@ class ClientRPCServerStreamingBase<PrepareAsyncServerStreaming, Executor>
}

/**
* @brief (experimental) I/O object for client-side, server-streaming rpcs
* @brief I/O object for client-side, server-streaming rpcs
*
* Example:
*
Expand Down Expand Up @@ -827,7 +827,7 @@ class ClientRPC<PrepareAsyncServerStreaming, Executor>
namespace detail
{
/**
* @brief (experimental) Bidirectional-streaming ClientRPC base
* @brief Bidirectional-streaming ClientRPC base
*
* @since 2.6.0
*/
Expand Down Expand Up @@ -994,7 +994,7 @@ class ClientRPCBidiStreamingBase<ResponderT<RequestT, ResponseT>, Executor>
}

/**
* @brief (experimental) I/O object for client-side, bidirectional-streaming rpcs
* @brief I/O object for client-side, bidirectional-streaming rpcs
*
* Example:
*
Expand Down Expand Up @@ -1104,7 +1104,7 @@ class ClientRPC<PrepareAsyncBidiStreaming, Executor>
};

/**
* @brief (experimental) I/O object for client-side, generic, streaming rpcs
* @brief I/O object for client-side, generic, streaming rpcs
*
* @tparam Executor The executor type, must be capable of referring to a `agrpc::GrpcContext`.
*
Expand Down Expand Up @@ -1168,7 +1168,7 @@ class ClientRPC<agrpc::ClientRPCType::GENERIC_STREAMING, Executor>
};

/**
* @brief (experimental) I/O object for client-side, generic, streaming rpcs (type alias)
* @brief I/O object for client-side, generic, streaming rpcs (type alias)
*
* @see agrpc::ClientRPC<agrpc::ClientRPCType::GENERIC_STREAMING,Executor>
*
Expand Down
2 changes: 1 addition & 1 deletion src/agrpc/detail/client_rpc_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ AGRPC_NAMESPACE_BEGIN()
namespace detail
{
/**
* @brief (experimental) ServerRPC base
* @brief ServerRPC base
*
* @since 2.7.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/agrpc/detail/client_rpc_context_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ AGRPC_NAMESPACE_BEGIN()
namespace detail
{
/**
* @brief (experimental) ClientRPC grpc::ClientContext base
* @brief ClientRPC grpc::ClientContext base
*
* @since 2.6.0
*/
Expand Down
15 changes: 2 additions & 13 deletions src/agrpc/detail/forward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include <agrpc/detail/config.hpp>
#include <agrpc/detail/grpc_executor_options.hpp>
#include <agrpc/detail/namespace_cpp20.hpp>

#include <memory>

Expand All @@ -39,7 +38,7 @@ class BasicAlarm;
struct UseSender;

/**
* @brief (experimental) Primary ClientRPC template
* @brief Primary ClientRPC template
*
* This is the main entrypoint into the recommended API for implementing asynchronous gRPC clients.
*
Expand All @@ -59,7 +58,7 @@ class ClientRPC;
struct DefaultServerRPCTraits;

/**
* @brief (experimental) Primary ServerRPC template
* @brief Primary ServerRPC template
*
* This is the main entrypoint into the recommended API for implementing asynchronous gRPC servers.
*
Expand Down Expand Up @@ -91,10 +90,6 @@ class AtomicIntrusiveQueue;

struct BasicSenderAccess;

struct RepeatedlyRequestContextAccess;

class GenericRPCContext;

struct HealthCheckServiceData;

class HealthCheckWatcher;
Expand Down Expand Up @@ -135,12 +130,6 @@ class NotifyWhenDoneEvent;

template <class ServerRPC, class RPCHandler, class CompletionHandler>
struct RegisterCallbackRPCHandlerOperation;

AGRPC_NAMESPACE_CPP20_BEGIN()

class RepeatedlyRequestFn;

AGRPC_NAMESPACE_CPP20_END
}

AGRPC_NAMESPACE_END
Expand Down
32 changes: 0 additions & 32 deletions src/agrpc/detail/namespace_cpp20.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion src/agrpc/detail/rpc_executor_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ AGRPC_NAMESPACE_BEGIN()
namespace detail
{
/**
* @brief (experimental) RPC's executor base
* @brief RPC's executor base
*
* @since 2.1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/agrpc/detail/server_rpc_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ AGRPC_NAMESPACE_BEGIN()
namespace detail
{
/**
* @brief (experimental) ServerRPC base
* @brief ServerRPC base
*
* @since 2.7.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/agrpc/detail/server_rpc_context_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct ServerContextBase<grpc::GenericServerAsyncReaderWriter>
};

/**
* @brief (experimental) ServerRPC ServerContext base
* @brief ServerRPC ServerContext base
*
* @since 2.6.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/agrpc/detail/server_rpc_notify_when_done_mixin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ AGRPC_NAMESPACE_BEGIN()
namespace detail
{
/**
* @brief (experimental) ServerRPC NotifyWhenDone base
* @brief ServerRPC NotifyWhenDone base
*
* @since 2.7.0
*/
Expand Down
25 changes: 3 additions & 22 deletions src/agrpc/read.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,12 @@ AGRPC_NAMESPACE_BEGIN()
namespace detail
{
/**
* @brief Client and server-side function object to read from streaming RPCs
*
* The examples below are based on the following .proto file:
*
* @snippet example.proto example-proto
*
* @attention The completion handler created from the completion token that is provided to the functions described below
* must have an associated executor that refers to a GrpcContext:
* @snippet server.cpp bind-executor-to-use-awaitable
*
* **Per-Operation Cancellation**
*
* None. Operations will be cancelled when the deadline of the RPC has been reached
* (see
* [grpc::ClientContext::set_deadline](https://grpc.github.io/grpc/cpp/classgrpc_1_1_client_context.html#ad4e16866fee3f6ee5a10efb5be6f4da6))
* or the call has been cancelled
* (see
* [grpc::ClientContext::TryCancel](https://grpc.github.io/grpc/cpp/classgrpc_1_1_client_context.html#abd0f6715c30287b75288015eee628984)
* and
* [grpc::ServerContext::TryCancel](https://grpc.github.io/grpc/cpp/classgrpc_1_1_server_context.html#a88d3a0c3d53e39f38654ce8fba968301)).
* @brief Server/ClientRPC.read in form of a function object
*/
struct ReadFn
{
/**
* @brief (experimental) Read from a ServerRPC
* @brief Read from a ServerRPC
*
* Equivalent to performing `rpc.read(req, token)`.
*
Expand All @@ -65,7 +46,7 @@ struct ReadFn
}

/**
* @brief (experimental) Read from a Client
* @brief Read from a Client
*
* Equivalent to performing `rpc.read(response, token)`.
*
Expand Down
4 changes: 2 additions & 2 deletions src/agrpc/register_awaitable_rpc_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
AGRPC_NAMESPACE_BEGIN()

/**
* @brief (experimental) Register an awaitable rpc handler for the given method
* @brief Register an awaitable rpc handler for the given method
*
* The rpc handler will be invoked for every incoming request of this gRPC method. It must take `ServerRPC&` as
* first argument and `ServerRPC::Request&` as second argument (only for unary and server-streaming rpcs). The ServerRPC
Expand Down Expand Up @@ -67,7 +67,7 @@ auto register_awaitable_rpc_handler(const typename ServerRPC::executor_type& exe
}

/**
* @brief (experimental) Register an awaitable rpc handler for the given method (GrpcContext overload)
* @brief Register an awaitable rpc handler for the given method (GrpcContext overload)
*
* @since 2.7.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/agrpc/register_callback_rpc_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
AGRPC_NAMESPACE_BEGIN()

/**
* @brief (experimental) Register a callback rpc handler for the given method
* @brief Register a callback rpc handler for the given method
*
* The rpc handler will be invoked for every incoming request of this gRPC method. It must take `ServerRPC::Ptr` as
* first and `ServerRPC::Request&` as second (only for unary and server-streaming rpcs) argument. The ServerRPC is
Expand Down Expand Up @@ -59,7 +59,7 @@ auto register_callback_rpc_handler(const typename ServerRPC::executor_type& exec
}

/**
* @brief (experimental) Register a callback rpc handler for the given method (GrpcContext overload)
* @brief Register a callback rpc handler for the given method (GrpcContext overload)
*
* @since 2.8.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/agrpc/register_sender_rpc_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
AGRPC_NAMESPACE_BEGIN()

/**
* @brief (experimental) Register an sender rpc handler for the given method
* @brief Register an sender rpc handler for the given method
*
* The rpc handler will be invoked for every incoming request of this gRPC method. It must take `ServerRPC&` as
* first argument and `ServerRPC::Request&` as second argument (only for unary and server-streaming rpcs). The ServerRPC
Expand Down
4 changes: 2 additions & 2 deletions src/agrpc/register_yield_rpc_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
AGRPC_NAMESPACE_BEGIN()

/**
* @brief (experimental) Register a Boost.Coroutine rpc handler for the given method
* @brief Register a Boost.Coroutine rpc handler for the given method
*
* The rpc handler will be invoked for every incoming request of this gRPC method. It must take `ServerRPC&` as
* first, `ServerRPC::Request&` as second (only for unary and server-streaming rpcs) and
Expand Down Expand Up @@ -62,7 +62,7 @@ auto register_yield_rpc_handler(const typename ServerRPC::executor_type& executo
}

/**
* @brief (experimental) Register a rpc handler for the given method (GrpcContext overload)
* @brief Register a rpc handler for the given method (GrpcContext overload)
*
* @since 2.7.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/agrpc/rpc_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
AGRPC_NAMESPACE_BEGIN()

/**
* @brief (experimental) The type of a ClientRPC
* @brief The type of a ClientRPC
*
* @since 2.1.0
*/
Expand Down Expand Up @@ -58,7 +58,7 @@ enum class ClientRPCType
};

/**
* @brief (experimental) The type of a ServerRPC
* @brief The type of a ServerRPC
*
* @since 2.7.0
*/
Expand Down
Loading

0 comments on commit 7d8e33e

Please sign in to comment.