Electric.Replication.PublicationManager.RelationTracker (electric v1.2.4)

View Source

Provides interface for shapes to register and deregister themselves from a publication, and tracks the overall set of relations that need to be published using reference counting.

Relies on Electric.Replication.PublicationManager.Configurator to perform the actual publication updates and handles status updates to reply to shapes requesting to be registered.

Summary

Types

relation_filters()

@type relation_filters() :: MapSet.t(Electric.oid_relation())

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

fetch_current_filters!(opts)

@spec fetch_current_filters!(Keyword.t()) :: relation_filters()

name(stack_id)

notify_configuration_error(result, opts)

@spec notify_configuration_error(
  {:error, any()},
  Keyword.t()
) :: :ok

notify_publication_status(status, opts)

@spec notify_publication_status(
  Electric.Postgres.Configuration.publication_status(),
  Keyword.t()
) :: :ok

notify_relation_configuration_result(oid_rel, result, opts)

@spec notify_relation_configuration_result(
  Electric.oid_relation(),
  {:ok, term()} | {:error, any()},
  Keyword.t()
) :: :ok

start_link(opts)