GrpcClient.Connection (GrpcClient v0.1.1)

Link to this section Summary

Functions

Starts a connection process

Link to this section Types

@type t() :: pid() | GenServer.name()

Link to this section Functions

Link to this function

start_link(opts)

@spec start_link(opts :: Keyword.t()) :: {:ok, t()} | GenServer.on_start()

Starts a connection process

This function can be called directly in order to link it to the current process, but the more common workflow is to start a Spear.Connection GenServer as a part of a supervision tree.

examples

Examples

E.g. in an application's supervision tree defined in lib/my_app/application.ex:

children = [
  {GrpcClient.Connection, name: MyConnection}
]
Supervisor.start_link(children, strategy: :one_for_one)