Documentation.md 4.0 KB

GRPCCore

A gRPC library for Swift written natively in Swift.

🚧 This module is part of gRPC Swift v2 which is under active development and in the pre-release stage.

Overview

Package structure

gRPC Swift is distributed across multiple Swift packages. These are:

This package, and this module (GRPCCore) in particular, include higher level documentation such as tutorials.

Modules in this package

  • GRPCCore (this module) contains core abstractions, currency types and runtime components for gRPC Swift.
  • GRPCInProcessTransport contains an in-process implementation of the ClientTransport and ServerTransport protocols.
  • GRPCodeGen contains components for building a code generator.

Topics

Tutorials

  • doc:Hello-World
  • doc:Route-Guide

Essentials

  • doc:Generating-stubs
  • doc:Error-handling

Project Information

  • doc:Compatibility

Getting involved

Resources for developers working on gRPC Swift:

  • doc:Design
  • doc:Benchmarks

Client and Server

  • GRPCClient
  • GRPCServer
  • withGRPCClient(transport:interceptors:isolation:handleClient:)
  • withGRPCClient(transport:interceptorPipeline:isolation:handleClient:)
  • withGRPCServer(transport:services:interceptors:isolation:handleServer:)
  • withGRPCServer(transport:services:interceptorPipeline:isolation:handleServer:)

Request and response types

  • ClientRequest
  • StreamingClientRequest
  • ClientResponse
  • StreamingClientResponse
  • ServerRequest
  • StreamingServerRequest
  • ServerResponse
  • StreamingServerResponse

Service definition and routing

  • RegistrableRPCService
  • RPCRouter

Interceptors

  • ClientInterceptor
  • ServerInterceptor
  • ClientContext
  • ServerContext
  • ConditionalInterceptor

RPC descriptors

  • MethodDescriptor
  • ServiceDescriptor

Service config

  • ServiceConfig
  • MethodConfig
  • HedgingPolicy
  • RetryPolicy
  • RPCExecutionPolicy

Serialization

  • MessageSerializer
  • MessageDeserializer
  • CompressionAlgorithm
  • CompressionAlgorithmSet

Transport protocols and supporting types

  • ClientTransport
  • ServerTransport
  • RPCRequestPart
  • RPCResponsePart
  • Status
  • Metadata
  • RetryThrottle
  • RPCStream
  • RPCWriterProtocol
  • ClosableRPCWriterProtocol
  • RPCWriter
  • RPCAsyncSequence

Cancellation

  • withServerContextRPCCancellationHandle(_:)
  • withRPCCancellationHandler(operation:onCancelRPC:)

Errors

  • RPCError
  • RPCErrorConvertible
  • RuntimeError