Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add deprecation warning to Online Docs mentioning gen_statem #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions lib/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ defmodule Connection do
@moduledoc ~S"""
A behaviour module for implementing connection processes.

> #### Deprecation Warning {: .warning}
>
> With the inclusion of [`gen_statem`](https://www.erlang.org/doc/man/gen_statem.html)
in Erlang/OTP, this project is no longer necessary.
>
> See the following pull request as examples
of replacing `Connection` by `gen_statem` in existing projects:
> * https://github.com/elixir-ecto/postgrex/pull/643
> * https://github.com/elixir-ecto/postgrex/pull/644
> * https://github.com/elixir-ecto/db_connection/pull/275
>
> We may release new versions if necessary to keep compatibility with Erlang/OTP and
Elixir but otherwise this package is no longer recommended for new projects.

The `Connection` behaviour is a superset of the `GenServer` behaviour. The
additional return values and callbacks are designed to aid building a
connection process that can handle a peer being (temporarily) unavailable.
Expand Down