GrpcChannelOptions QML Type

The GrpcChannelOptions is an storage class used to set additional channel options. 更多...

import 语句: import QtGrpc
Since: Qt 6.7
在 C++: QGrpcChannelOptions

特性

详细描述

Provides a set of properties to access the channel options that are used by gRPC channels to communicate with the services.

另请参阅 QGrpcChannelOptions .

特性文档编制

deadlineTimeout : int

Sets a deadline value for a channel.

另请参阅 QGrpcChannelOptions::deadlineTimeout .

metadata : GrpcMetadata

Sets a pointer to the metadata object used for a channel.

另请参阅 GrpcMetadata .

serializationFormat : enumeration [since 6.8]

Sets the serialization format for the channel. The QtGrpc::SerializationFormat::Default format is used by default.

常量 描述
QtGrpc.SerializationFormat.Default 默认 QGrpcSerializationFormat preset. This preset constructs a QProtobufSerializer with an empty content type suffix.
QtGrpc.SerializationFormat.Protobuf The embedded protobuf QGrpcSerializationFormat preset. This preset constructs a QProtobufSerializer 采用 proto content type suffix.
QtGrpc.SerializationFormat.Json The embedded JSON QGrpcSerializationFormat preset. This preset constructs a QProtobufJsonSerializer 采用 json content type suffix.

该特性在 Qt 6.8 引入。

另请参阅 QGrpcChannelOptions::serializationFormat , QtGrpc::SerializationFormat ,和 QGrpcSerializationFormat .