View Source GRPC.Server.Adapter behaviour (grpc v0.9.0)

HTTP server adapter for GRPC.

Summary

Types

@type state() :: %{
  pid: pid(),
  handling_timer: reference() | nil,
  resp_trailers: map(),
  compressor: atom() | nil,
  pending_reader: nil
}

Callbacks

Link to this callback

send_headers(state, headers)

View Source
@callback send_headers(state(), headers :: map()) :: any()
Link to this callback

send_reply(state, content, opts)

View Source
@callback send_reply(state(), content :: binary(), opts :: keyword()) :: any()
Link to this callback

start(atom, map, port, opts)

View Source
@callback start(
  atom(),
  %{required(String.t()) => [module()]},
  port :: non_neg_integer(),
  opts :: keyword()
) :: {atom(), any(), non_neg_integer()}
@callback stop(atom(), %{required(String.t()) => [module()]}) ::
  :ok | {:error, :not_found}