이 페이지에서

QtGrpc Namespace

QtGrpc 네임스페이스에는 QtGrpc 라이브러리 전반에 걸쳐 사용되는 다양한 식별자가 포함되어 있습니다. 더 보기...

헤더: #include <QtGrpcNamespace>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
다음과 같이: Qt 6.5

클래스

(since 6.10) struct MultiValue_t
(since 6.11) struct RpcDescriptor

형

(since 6.12) enum class CompressionAlgorithm { Identity, Deflate, Gzip }
flags CompressionAlgorithms
(since 6.11) flags InterceptorCapabilities
(since 6.11) enum class InterceptorCapability { Start, InitialMetadata, MessageReceived, WriteMessage, WritesDone, …, Cancel }
(since 6.11) enum class RpcType { UnaryCall, ServerStreaming, ClientStreaming, BidiStreaming }
enum class SerializationFormat { Default, Protobuf, Json }
enum class StatusCode { Ok, Cancelled, InvalidArgument, DeadlineExceeded, NotFound, …, Unauthenticated }

변수

(since 6.10) const struct QtGrpc::MultiValue_t MultiValue

상세 설명

클래스

클래스 MultiValue_t

QMultiHash 메타데이터에 접근하는 데 사용되는 태그 유형. 더 보기...

class RpcDescriptor

서비스 이름, 메서드 이름 및 RPC 유형을 사용하여 gRPC 메서드를 설명합니다. 더 보기...

타입 문서

[since 6.12] enum class QtGrpc::CompressionAlgorithm
flags QtGrpc::CompressionAlgorithms

gRPC 메시지에서 지원되는 압축 알고리즘을 나열합니다.

HTTP/2 channel 는 ` grpc-accept-encoding ` 요청 헤더에 선택된 알고리즘을 알리고, ` setRequestCompression()`를 통해 선택된 알고리즘으로 압축된 아웃바운드 메시지를 전송합니다.

상수값설명
QtGrpc::CompressionAlgorithm::Identity0x01압축 없음. gRPC 사양에 따라 압축되지 않은 메시지는 반드시 수락되어야 하므로, 허용되는 세트에는 항상 포함됩니다.
QtGrpc::CompressionAlgorithm::Deflate0x02deflate 압축 알고리즘.
QtGrpc::CompressionAlgorithm::Gzip0x04gzip 압축 알고리즘.

이 열거형은 Qt 6.12에서 도입되었습니다.

CompressionAlgorithms 유형은 QFlags<CompressionAlgorithm>에 대한 typedef입니다. 이 유형은 CompressionAlgorithm 값들의 OR 조합을 저장합니다.

QGrpcChannelOptions::setAcceptedCompressionAlgorithms(), QGrpcChannelOptions::supportedCompressionAlgorithms(), QGrpcChannelOptions::setRequestCompression(), QGrpcCallOptions::setRequestCompression()도 참조하십시오 .

[since 6.11] enum class InterceptorCapability
[since 6.11] flags InterceptorCapabilities

인터셉터가 지원하는 인터셉션 훅 지점을 지정합니다.

Qt GRPC InterceptorCapability 값을 사용하여 인터셉터가 제공하는 인터셉션 후크 지점을 설명합니다.

단일 인터셉터 클래스는 여러 인터셉터 인터페이스(예: QGrpcStartInterceptor 및 QGrpcFinishedInterceptor)를 구현할 수 있으며, 따라서 여러 기능을 지원할 수 있습니다.

상수값설명
InterceptorCapability::Start0x01인터셉터는 QGrpcStartInterceptor 를 구현합니다.
InterceptorCapability::InitialMetadata0x02인터셉터는 QGrpcInitialMetadataInterceptor 를 구현합니다.
InterceptorCapability::MessageReceived0x04이 인터셉터는 ` QGrpcMessageReceivedInterceptor`를 구현합니다.
InterceptorCapability::WriteMessage0x08이 인터셉터는 QGrpcWriteMessageInterceptor 를 구현합니다.
InterceptorCapability::WritesDone0x10인터셉터는 QGrpcWritesDoneInterceptor 를 구현합니다.
InterceptorCapability::TrailingMetadata0x20인터셉터는 QGrpcTrailingMetadataInterceptor 를 구현합니다.
InterceptorCapability::Finished0x40인터셉터는 QGrpcFinishedInterceptor 를 구현합니다.
InterceptorCapability::Cancel0x80이 인터셉터는 ` QGrpcCancelInterceptor`를 구현합니다.

이 열거형은 Qt 6.11에서 도입되었습니다.

InterceptorCapabilities 유형은 QFlags<InterceptorCapability>에 대한 typedef입니다. 이 유형은 InterceptorCapability 값들의 OR 조합을 저장합니다.

[since 6.11] enum class QtGrpc::RpcType

RPC(원격 프로시저 호출)의 유형을 설명합니다.

이 열거형은 gRPC 메서드가 사용하는 통신 패턴을 지정합니다.

상수값설명
QtGrpc::RpcType::UnaryCall0QGrpcCallReply 핸들러를 사용합니다.
QtGrpc::RpcType::ServerStreaming1QGrpcServerStream 핸들러를 사용합니다.
QtGrpc::RpcType::ClientStreaming2QGrpcClientStream 핸들러를 사용합니다.
QtGrpc::RpcType::BidiStreaming3QGrpcBidiStream 핸들러를 사용합니다.

이 열거형은 Qt 6.11에서 도입되었습니다.

QtGrpc::RpcDescriptor도 참조하십시오 .

enum class QtGrpc::SerializationFormat

Protobuf 직렬화기 형식을 설정하기 위한 사전 정의된 값이 포함되어 있습니다.

상수값설명
QtGrpc::SerializationFormat::Default0기본 QGrpcSerializationFormat 사전 설정입니다. 이 사전 설정은 콘텐츠 유형 접미사가 비어 있는 QProtobufSerializer 를 생성합니다.
QtGrpc::SerializationFormat::Protobuf1임베디드 프로토버프 QGrpcSerializationFormat 사전 설정입니다. 이 사전 설정은 콘텐츠 유형 접미사가 proto 인 QProtobufSerializer 를 생성합니다.
QtGrpc::SerializationFormat::Json2임베디드 JSON QGrpcSerializationFormat 프리셋입니다. 이 프리셋은 json 콘텐츠 유형 접미사를 가진 QProtobufJsonSerializer 를 생성합니다.

QGrpcSerializationFormat도 참조하십시오 .

enum class QtGrpc::StatusCode

채널의 상태 코드.

상수값설명
QtGrpc::StatusCode::Ok0오류 없음
QtGrpc::StatusCode::Cancelled1작업이 취소되었습니다(일반적으로 호출자에 의해).
QtGrpc::StatusCode::InvalidArgument3클라이언트가 유효하지 않은 인수를 지정했거나,
QtGrpc::StatusCode::DeadlineExceeded4작업이 완료되기 전에 마감 시간이 지났습니다.
QtGrpc::StatusCode::NotFound5요청된 엔티티(예: 파일 또는 디렉터리)를 찾을 수 없습니다.
QtGrpc::StatusCode::AlreadyExists6클라이언트가 생성하려고 시도한 개체(예: 파일 또는 디렉터리)가 이미 존재합니다.
QtGrpc::StatusCode::PermissionDenied7호출자에게는 지정된 작업을 실행할 권한이 없습니다. 리소스 고갈로 인한 거부 시에는 ` PermissionDenied `을 사용해서는 안 됩니다(이러한 오류의 경우 대신 ` ResourceExhausted `을 사용하십시오). 호출자를 식별할 수 없는 경우 ` PermissionDenied `을 사용해서는 안 됩니다(이러한 오류의 경우 대신 ` Unauthenticated `을 사용하십시오). 이 오류 코드는 요청이 유효하거나, 요청된 엔티티가 존재하거나, 기타 전제 조건을 충족함을 의미하지 않습니다.
QtGrpc::StatusCode::ResourceExhausted8사용자별 할당량과 같은 일부 리소스가 소진되었거나, 전체 파일 시스템의 공간이 부족할 수 있습니다.
QtGrpc::StatusCode::FailedPrecondition9시스템이 작업 실행에 필요한 상태가 아니기 때문에 작업이 거부되었습니다.
QtGrpc::StatusCode::Aborted10일반적으로 시퀀서 검사 실패나 트랜잭션 중단과 같은 동시성 문제로 인해 작업이 중단되었습니다.
QtGrpc::StatusCode::OutOfRange11유효한 범위를 벗어나서 작업이 시도되었습니다.
QtGrpc::StatusCode::Unimplemented12이 작업이 구현되지 않았거나 이 서비스에서 지원되지 않거나 활성화되지 않았습니다.
QtGrpc::StatusCode::Internal13이는 기본 시스템에서 예상하는 일부 불변 조건이 위반되었음을 의미합니다.
QtGrpc::StatusCode::Unavailable14현재 서비스를 사용할 수 없습니다. 이는 일시적인 상태일 가능성이 높으며, 백오프(backoff)를 적용하여 재시도하면 해결될 수 있습니다. 비이멧포텐트(non-idempotent) 작업을 재시도하는 것이 항상 안전한 것은 아니라는 점에 유의하십시오.
QtGrpc::StatusCode::DataLoss15복구 불가능한 데이터 손실 또는 손상.
QtGrpc::StatusCode::Unauthenticated16요청에 해당 작업에 대한 유효한 인증 자격 증명이 없습니다.

gRPC 상태 코드도 참조하십시오 .

변수 문서

[since 6.10] const struct QtGrpc::MultiValue_t QtGrpc::MultiValue

QMultiHash 메타데이터에 접근하는 데 사용되는 태그입니다.

이 변수는 Qt 6.10에서 도입되었습니다.

QGrpcChannelOptions::metadata(QtGrpc::MultiValue_t) 및 QGrpcCallOptions::metadata(QtGrpc::MultiValue_t)도 참조하십시오 .

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.