StatusCodec
class StatusCodec
| internal |
Methods
static Status|null
parse(array $headers, int $httpStatus, bool $endStream)
Parse a final gRPC status event.
static Status
fromHttpStatus(int $httpStatus)
Map an HTTP response without grpc-status to a gRPC status.
static bool
isTrailersOnly(array $headers, bool $initialEvent, bool $endStream)
Determine whether an event is a trailers-only response.
static string
encodeMessage(string $message)
Percent-encode a gRPC status message.
static string
decodeMessage(string $message)
Tolerantly decode a gRPC status message.
Details
at line 23
static array
encode(Status $status)
Encode a gRPC status as final wire fields.
at line 46
static Status|null
parse(array $headers, int $httpStatus, bool $endStream)
Parse a final gRPC status event.
at line 106
static Status
fromHttpStatus(int $httpStatus)
Map an HTTP response without grpc-status to a gRPC status.
at line 128
static bool
isTrailersOnly(array $headers, bool $initialEvent, bool $endStream)
Determine whether an event is a trailers-only response.
at line 139
static string
encodeMessage(string $message)
Percent-encode a gRPC status message.
at line 158
static string
decodeMessage(string $message)
Tolerantly decode a gRPC status message.