module GRPC
Nested Classes and Modules
class CallRepresents context for a single RPC call.
class ErrorBase exception class for gRPC errors
class CancelledRepresents a cancelled gRPC operation.
class InvalidArgumentRepresents an invalid argument error.
class DeadlineExceededRepresents a deadline exceeded error.
class NotFoundRepresents a not found error.
class InternalRepresents an internal server error.
class UnavailableRepresents an unavailable service error.
class UnauthenticatedRepresents an unauthenticated error.
class StreamingWrapper class to mark a message type as streamed. Used with the stream() helper method in RPC definitions.
class InterfaceRepresents an interface definition for gRPC methods. Can be used by both client stubs and server implementations.
module MetadataProvides operations for building and extracting gRPC metadata.
class MiddlewareRepresents server middleware for handling gRPC requests. Implements Protocol::HTTP::Middleware interface. Subclasses should implement
Protocol::GRPC::Middleware#dispatchto handle service routing and protocol details.module RouteProvides operations for parsing and building gRPC request paths.
module StatusProvides gRPC status codes and their names.
Definitions
HEADER_POLICY
Custom header policy for gRPC. Extends Protocol::HTTP::Headers::POLICY with gRPC-specific headers.
Implementation
HEADER_POLICY = Protocol::HTTP::Headers::POLICY.merge(
# Request headers:
"grpc-timeout" => Header::Timeout,
"grpc-encoding" => Header::Encoding,
# Response headers:
"grpc-status" => Header::Status,
"grpc-message" => Header::Message
# By default, all other headers follow standard HTTP policy, but gRPC allows most metadata to be sent as trailers.
).freeze