View Source GRPC.Client.Adapter behaviour (grpc v0.5.0)

HTTP client adapter for GRPC.

Link to this section Summary

Types

Determines if the headers have finished being read.

Link to this section Types

@type fin() :: :fin | :nofin

Determines if the headers have finished being read.

Link to this section Callbacks

@callback connect(GRPC.Channel.t(), map()) :: {:ok, GRPC.Channel.t()} | {:error, any()}
@callback disconnect(GRPC.Channel.t()) :: {:ok, GRPC.Channel.t()} | {:error, any()}
Link to this callback

recv_data_or_trailers(map, map, map)

View Source
@callback recv_data_or_trailers(map(), map(), map()) ::
  {:data, binary()} | {:trailers, binary()} | {:error, GRPC.RPCError.t()}
Link to this callback

recv_headers(map, map, map)

View Source
@callback recv_headers(map(), map(), map()) ::
  {:ok, %{required(String.t()) => String.t()}, fin()}
  | {:error, GRPC.RPCError.t()}
Link to this callback

send_request(t, binary, map)

View Source
@callback send_request(GRPC.Client.Stream.t(), binary(), map()) :: GRPC.Client.Stream.t()