A struct as an argument that servers get in rpc function definitions and use to handle headers, send streaming replies.
Notice that you MUST use new stream returned by GRPC.Server as an argument to invoke next
functions defined by GRPC.Server.
Fields
:server- user defined gRPC server module:adapter- a server adapter module, likeGRPC.Server.Adapters.Cowboyrequest_mod- the request module, or nil for untyped protocolsresponse_mod- the response module, or nil for untyped protocols:codec- the codec:payload- the payload needed by the adapter:local- local data initialized by user:deadline- absolute monotonic-time (ms) by which the inbound request must complete, ornilwhen the caller set no deadline
Summary
Functions
Milliseconds left before the inbound deadline, or :infinity if the caller set none.
Clamped at 0 so an already-expired deadline never returns a negative value.
Types
@type access_mode() :: :grpc | :grpcweb | :http_transcoding
@type t() :: %GRPC.Server.Stream{ __interface__: map(), access_mode: access_mode(), adapter: atom(), codec: atom(), compressor: module() | nil, deadline: integer() | nil, endpoint: atom(), grpc_type: atom(), http_method: GRPC.Server.Router.http_method(), http_request_headers: map(), http_transcode: boolean(), is_preflight?: boolean(), local: any(), method_name: String.t(), payload: any(), request_id: String.t() | nil, request_mod: atom(), response_mod: atom(), rpc: tuple(), server: atom(), service_name: String.t() }
Functions
@spec remaining_ms(t()) :: non_neg_integer() | :infinity
Milliseconds left before the inbound deadline, or :infinity if the caller set none.
Clamped at 0 so an already-expired deadline never returns a negative value.