Skeg.Server (skeg v1.0.0)

Copy Markdown

What the connected server is and can do. Every function takes :timeout in ms as an option.

Summary

Functions

Whether capabilities lists feature.

Checks that the server answers.

The tenant this connection acts as, and its access mode.

Functions

capabilities(conn, opts \\ [])

@spec capabilities(Skeg.conn(), keyword()) ::
  {:ok, Skeg.Server.Capabilities.t()} | {:error, Skeg.Error.t()}

has_feature?(capabilities, feature)

@spec has_feature?(Skeg.Server.Capabilities.t(), String.t()) :: boolean()

Whether capabilities lists feature.

ping(conn, opts \\ [])

@spec ping(Skeg.conn(), keyword()) :: :ok | {:error, Skeg.Error.t()}

Checks that the server answers.

whoami(conn, opts \\ [])

@spec whoami(Skeg.conn(), keyword()) ::
  {:ok, %{tenant: String.t(), mode: String.t()}} | {:error, Skeg.Error.t()}

The tenant this connection acts as, and its access mode.