View Source Electric.Postgres.ReplicationClient.ConnectionSetup (electric v0.9.5)
This module encapsulates the initial setup of a replication connection opened by
Electric.Postgres.ReplicationClient
.
A state machine is implemented to run a series of SQL queries prior to switching the
connection into the logical streaming mode. This helps keep the main ReplicationClient
module focused on the handling of logical messages.
Summary
Types
@type query_result() :: [Postgrex.Result.t()] | Postgrex.Error.t()
@type state() :: Electric.Postgres.ReplicationClient.State.t()
@type step() :: Electric.Postgres.ReplicationClient.step()
Functions
@spec process_query_result(query_result(), state()) :: callback_return()
@spec start(state()) :: callback_return()
@spec start_streaming(state()) :: callback_return()