The QGrpcChannelOptions is an storage class used to set additional channel options. 更多...
头: | #include <QGrpcChannelOptions> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc) |
Since: | Qt 6.6 |
实例化: | QQmlGrpcChannelOptions |
状态: | 技术预览 |
QGrpcChannelOptions (const QUrl & host ) | |
QGrpcChannelOptions (const QGrpcChannelOptions & other ) | |
QGrpcChannelOptions (QGrpcChannelOptions && other ) | |
~QGrpcChannelOptions () | |
std::optional<std::chrono::milliseconds> | deadline () const |
QUrl | host () const |
QGrpcMetadata | metadata () const |
std::optional<QSslConfiguration> | sslConfiguration () const |
QGrpcChannelOptions & | withDeadline (std::chrono::milliseconds deadline ) |
QGrpcChannelOptions & | withHost (const QUrl & host ) |
QGrpcChannelOptions & | withMetadata (const QGrpcMetadata & metadata ) |
QGrpcChannelOptions & | withSslConfiguration (const QSslConfiguration & sslConfiguration ) |
QGrpcChannelOptions & | operator= (const QGrpcChannelOptions & other ) |
QGrpcChannelOptions & | operator= (QGrpcChannelOptions && other ) |
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.
[explicit]
QGrpcChannelOptions::
QGrpcChannelOptions
(const
QUrl
&
host
)
Constructs an QGrpcChannelOptions object with host 值。
Construct a copy of QGrpcChannelOptions with other 对象。
[noexcept]
QGrpcChannelOptions::
QGrpcChannelOptions
(
QGrpcChannelOptions
&&
other
)
Move-construct a QGrpcChannelOptions instance, making it point at the same object that other 所指向的。
[noexcept]
QGrpcChannelOptions::
~QGrpcChannelOptions
()
销毁 QGrpcChannelOptions 对象。
[noexcept]
std::optional
<
std::chrono::milliseconds
> QGrpcChannelOptions::
deadline
() const
Returns deadline value for setting up 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.
[noexcept]
QUrl
QGrpcChannelOptions::
host
() const
Returns host value for the channel.
Returns metadata used for every call on the channel.
If value was not set returns empty QGrpcMetadata .
[noexcept]
std::optional
<
QSslConfiguration
> QGrpcChannelOptions::
sslConfiguration
() const
Returns SSL configuration for the channel.
If value was not set returns empty std::optional.
Sets deadline value with deadline and returns updated QGrpcChannelOptions 对象。
Sets host value with host and returns updated QGrpcChannelOptions 对象。
设置 metadata for all calls and returns updated QGrpcChannelOptions 对象。
For HTTP2-based channels, metadata is converted into HTTP/2 headers, that added to each HTTP/2 request.
Sets SSL configuration with sslConfiguration and returns updated QGrpcChannelOptions 对象。
赋值 other 到此 QGrpcChannelOptions and returns a reference to this QGrpcChannelOptions .
[noexcept]
QGrpcChannelOptions
&QGrpcChannelOptions::
operator=
(
QGrpcChannelOptions
&&
other
)
移动赋值 other 到此 QGrpcChannelOptions 实例。