GrpcClient.Connection (GrpcClient v0.1.3)
Summary
Functions
Starts a connection process
Types
@type t() :: pid() | GenServer.name()
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
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)