Spear.shutdown

You're seeing just the function shutdown, go back to Spear module for more information.
Link to this function

shutdown(conn, opts \\ [])

View Source (since 0.4.0)

Specs

shutdown(connection :: Spear.Connection.t(), opts :: Keyword.t()) ::
  :ok | {:error, any()}

Shuts down the connected EventStoreDB

The user performing the shutdown (either the connection credentials or credentials passed by the :credentials option) must at least be in the $ops group. $admins permissions are a superset of $ops.

Options

Options are passed to request/5.

Examples

iex> Spear.shutdown(conn)
:ok
iex> Spear.ping(conn)
{:error, :closed}

iex> Spear.shutdown(conn, credentials: {"some_non_ops_user", "changeit"})
{:error,
 %Spear.Grpc.Response{
   data: "",
   message: "Access Denied",
   status: :permission_denied,
   status_code: 7
 }}
iex> Spear.ping(conn)
:pong