grpc library Null safety

Classes

BadRequest
BadRequest_FieldViolation
BaseAuthenticator
CallOptions
Runtime options for an RPC.
ChannelCredentials
Options controlling TLS security settings on a ClientChannel.
ChannelOptions
Options controlling how connections are made on a ClientChannel.
Client
Base class for client stubs.
ClientCall<Q, R>
An active call to a gRPC endpoint.
ClientChannel
A channel to a virtual gRPC endpoint. [...]
ClientInterceptor
ClientInterceptors intercepts client calls before they are executed. [...]
ClientMethod<Q, R>
Description of a gRPC method.
ClientTransportConnector
A transport-specific configuration used by gRPC clients to connect.
ClientTransportConnectorChannel
Codec
CodecRegistry
Encloses classes related to the compression and decompression of messages.
ComputeEngineAuthenticator
ConnectionServer
A gRPC server that serves via provided ServerTransportConnections. [...]
DebugInfo
ErrorInfo
GrpcData
GrpcHttpDecoder
GrpcHttpEncoder
GrpcMessage
GrpcMetadata
GzipCodec
A gzip compressor and decompressor.
Help
HttpBasedAuthenticator
IdentityCodec
The "identity", or "none" codec. [...]
JwtServiceAccountAuthenticator
LocalizedMessage
PreconditionFailure
PreconditionFailure_Violation
QuotaFailure
QuotaFailure_Violation
RequestInfo
ResourceInfo
Response
A gRPC response.
ResponseFuture<R>
A gRPC response producing a single value.
ResponseStream<R>
A gRPC response producing a stream of values.
RetryInfo
Server
A gRPC server. [...]
ServerCredentials
Wrapper around grpc_server_credentials, a way to authenticate a server.
ServerLocalCredentials
Set of credentials that only allows local TCP connections.
ServerTlsCredentials
Service
Definition of a gRPC service.
ServiceAccountAuthenticator
ServiceCall
Server-side context for a gRPC call. [...]
ServiceMethod<Q, R>
Definition of a gRPC service method.
StatusCode

Constants

defaultIdleTimeout → const Duration
Duration(minutes: 5)
supportedAlpnProtocols → const List<String>
['grpc-exp', 'h2']

Properties

isTimelineLoggingEnabled bool
Enable logging requests and response for clients. [...]
read / write

Functions

allowBadCertificates(X509Certificate certificate, String host) bool
Bad certificate handler that disables all certificate checks. DO NOT USE IN PRODUCTION! Can be used during development and testing to accept self-signed certificates, etc.
applicationDefaultCredentialsAuthenticator(List<String> scopes) Future<HttpBasedAuthenticator>
Create an HttpBasedAuthenticator using Application Default Credentials. [...]
createSecurityContext(bool isServer) SecurityContext
defaultBackoffStrategy(Duration? lastBackoff) Duration
fromTimeoutString(String? timeout) Duration?
Convert timeout from grpc-timeout header string format to Duration. Returns null if timeout is not correctly formatted.
grpcDecompressor({CodecRegistry? codecRegistry}) StreamTransformer<GrpcMessage, GrpcMessage>
toTimeoutString(Duration duration) String
Convert timeout to grpc-timeout header string format.

Enums

ConnectionState

Typedefs

BackoffStrategy = Duration Function(Duration? lastBackoff)
BadCertificateHandler = bool Function(X509Certificate certificate, String host)
Handler for checking certificates that fail validation. If this handler returns true, the bad certificate is allowed, and the TLS handshake can continue. If the handler returns false, the TLS handshake fails, and the connection is aborted.
ClientStreamingInvoker<Q, R> = ResponseStream<R> Function(ClientMethod<Q, R> method, Stream<Q> requests, CallOptions options)
ClientUnaryInvoker<Q, R> = ResponseFuture<R> Function(ClientMethod<Q, R> method, Q request, CallOptions options)
Interceptor = FutureOr<GrpcError?> Function(ServiceCall call, ServiceMethod method)
A gRPC Interceptor. [...]
MetadataProvider = FutureOr<void> Function(Map<String, String> metadata, String uri)
Provides per-RPC metadata. [...]

Exceptions / Errors

GrpcError