GRPC Objective-C  1.26.0
Data Structures | Typedefs | Functions | Variables
GRPCTypes.h File Reference

Go to the source code of this file.

Data Structures

protocol  <GRPCAuthorizationProtocol>
 Implement this protocol to provide a token to gRPC when a call is initiated. More...
 

Typedefs

typedef GRPCCompressionAlgorithm GRPCCompressAlgorithm
 GRPCCompressAlgorithm is deprecated. More...
 
typedef char *_Nonnull GRPCTransportID
 The id of a transport implementation. More...
 

Functions

typedef NS_ENUM (NSUInteger, GRPCErrorCode)
 gRPC error codes. More...
 
typedef NS_ENUM (NSUInteger, GRPCCallSafety)
 Safety remark of a gRPC method as defined in RFC 2616 Section 9.1. More...
 
typedef NS_ENUM (NSUInteger, GRPCCompressionAlgorithm)
 Compression algorithm to be used by a gRPC call. More...
 
typedef NS_ENUM (NSUInteger, GRPCTransportType)
 The transport to be used by a gRPC call. More...
 

Variables

NSString *_Nonnull const kGRPCErrorDomain
 Domain of NSError objects produced by gRPC. More...
 
NSString *_Nonnull const kGRPCHeadersKey
 Keys used in |NSError|'s |userInfo| dictionary to store the response headers and trailers sent by the server. More...
 
NSString *_Nonnull const kGRPCTrailersKey
 

Typedef Documentation

◆ GRPCCompressAlgorithm

typedef GRPCCompressionAlgorithm GRPCCompressAlgorithm

GRPCCompressAlgorithm is deprecated.

◆ GRPCTransportID

typedef char* _Nonnull GRPCTransportID

The id of a transport implementation.

Function Documentation

◆ NS_ENUM() [1/4]

typedef NS_ENUM ( NSUInteger  ,
GRPCCallSafety   
)

Safety remark of a gRPC method as defined in RFC 2616 Section 9.1.

Signal that there is no guarantees on how the call affects the server state.

Signal that the call is idempotent. gRPC is free to use PUT verb.

Signal that the call is cacheable and will not affect server state. gRPC is free to use GET verb.

◆ NS_ENUM() [2/4]

typedef NS_ENUM ( NSUInteger  ,
GRPCCompressionAlgorithm   
)

Compression algorithm to be used by a gRPC call.

This enumeration and corresponding call option GRPCCallOptions.transportType are deprecated by the call option GRPCCallOptions.transport.

◆ NS_ENUM() [3/4]

typedef NS_ENUM ( NSUInteger  ,
GRPCErrorCode   
)

gRPC error codes.

Note that a few of these are never produced by the gRPC libraries, but are of general utility for server applications to produce.

The operation was cancelled (typically by the caller).

Unknown error. Errors raised by APIs that do not return enough error information may be converted to this error.

The client specified an invalid argument. Note that this differs from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the server (e.g., a malformed file name).

Deadline expired before operation could complete. For operations that change the state of the server, this error may be returned even if the operation has completed successfully. For example, a successful response from the server could have been delayed long enough for the deadline to expire.

Some requested entity (e.g., file or directory) was not found.

Some entity that we attempted to create (e.g., file or directory) already exists.

The caller does not have permission to execute the specified operation. PERMISSION_DENIED isn't used for rejections caused by exhausting some resource (RESOURCE_EXHAUSTED is used instead for those errors). PERMISSION_DENIED doesn't indicate a failure to identify the caller (UNAUTHENTICATED is used instead for those errors).

The request does not have valid authentication credentials for the operation (e.g. the caller's identity can't be verified).

Some resource has been exhausted, perhaps a per-user quota.

The RPC was rejected because the server is not in a state required for the procedure's execution. For example, a directory to be deleted may be non-empty, etc. The client should not retry until the server state has been explicitly fixed (e.g. by performing another RPC). The details depend on the service being called, and should be found in the NSError's userInfo.

The RPC was aborted, typically due to a concurrency issue like sequencer check failures, transaction aborts, etc. The client should retry at a higher-level (e.g., restarting a read- modify-write sequence).

The RPC was attempted past the valid range. E.g., enumerating past the end of a list. Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed if the system state changes. For example, an RPC to get elements of a list will generate INVALID_ARGUMENT if asked to return the element at a negative index, but it will generate OUT_OF_RANGE if asked to return the element at an index past the current size of the list.

The procedure is not implemented or not supported/enabled in this server.

Internal error. Means some invariant expected by the server application or the gRPC library has been broken.

The server is currently unavailable. This is most likely a transient condition and may be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations.

Unrecoverable data loss or corruption.

◆ NS_ENUM() [4/4]

typedef NS_ENUM ( NSUInteger  ,
GRPCTransportType   
)

The transport to be used by a gRPC call.

gRPC internal HTTP/2 stack with BoringSSL

Cronet stack

Insecure channel. FOR TEST ONLY!

Variable Documentation

◆ kGRPCErrorDomain

NSString* _Nonnull const kGRPCErrorDomain
extern

Domain of NSError objects produced by gRPC.

◆ kGRPCHeadersKey

NSString* _Nonnull const kGRPCHeadersKey
extern

Keys used in |NSError|'s |userInfo| dictionary to store the response headers and trailers sent by the server.

◆ kGRPCTrailersKey

NSString* _Nonnull const kGRPCTrailersKey
extern