QGrpcChannelOptions Class
The QGrpcChannelOptions is an storage class used to set additional channel options. More...
Header: | #include <QGrpcChannelOptions> |
Public Functions
QGrpcChannelOptions(const QUrl &host) | |
QGrpcChannelOptions(const QGrpcChannelOptions &other) | |
~QGrpcChannelOptions() | |
int | deadline() const |
QUrl | host() const |
int | metadata() const |
int | sslConfiguration() const |
QGrpcChannelOptions & | withHost(const QUrl &host) |
QGrpcChannelOptions & | withMetadata(const int &metadata) |
QGrpcChannelOptions & | withSslConfiguration(const QSslConfiguration &sslConfiguration) |
QGrpcChannelOptions & | operator=(const QGrpcChannelOptions &other) |
Detailed Description
\inmodule
QtGrpc
QGrpcChannelOptions provides a set of functions to set and access the channel and default call options that are used by gRPC channels to communicate with the services.
Member Function Documentation
[explicit]
QGrpcChannelOptions::QGrpcChannelOptions(const QUrl &host)
Constructs an QGrpcChannelOptions object with host value.
QGrpcChannelOptions::QGrpcChannelOptions(const QGrpcChannelOptions &other)
Construct a copy of QGrpcChannelOptions with other object.
[noexcept]
QGrpcChannelOptions::~QGrpcChannelOptions()
Destroys the QGrpcChannelOptions object.
int QGrpcChannelOptions::deadline() const
Returns deadline value for every call on the channel.
Deadline value controls the maximum execution time of any call or stream executed on the channel.
If value was not set returns empty std::optional.
QUrl QGrpcChannelOptions::host() const
Returns host value for every call on the channel.
int QGrpcChannelOptions::metadata() const
Returns metadata used for a call.
If value was not set returns empty QGrpcMetadata.
int QGrpcChannelOptions::sslConfiguration() const
Returns SSL configuration for the channel.
If value was not set returns empty std::optional.
QGrpcChannelOptions &QGrpcChannelOptions::withHost(const QUrl &host)
Sets host value with host and returns updated QGrpcChannelOptions object.
QGrpcChannelOptions &QGrpcChannelOptions::withMetadata(const int &metadata)
Sets metadata for a call and returns updated QGrpcCallOptions object.
For HTTP2-based channels, metadata is converted into HTTP/2 headers, that added to each HTTP/2 request.
QGrpcChannelOptions &QGrpcChannelOptions::withSslConfiguration(const QSslConfiguration &sslConfiguration)
Sets SSL configuration with sslConfiguration and returns updated QGrpcChannelOptions object.
QGrpcChannelOptions &QGrpcChannelOptions::operator=(const QGrpcChannelOptions &other)
Assigns other to this QGrpcChannelOptions and returns a reference to this QGrpcChannelOptions.