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

View Source

Manages a PostgreSQL publication for a given Electric stack, tracking shapes and ensuring that the publication configuration matches the required set of relations that need to be published for the shapes to function correctly.

Includes periodic checks of the publication to ensure that it remains valid, and expires any shapes that are no longer valid due to schema changes or permission issues.

Summary

Types

shape_handle()

@type shape_handle() :: Electric.ShapeCache.shape_handle()

stack_id()

@type stack_id() :: Electric.stack_id()

Callbacks

add_shape(shape_handle, t, t)

@callback add_shape(shape_handle(), Electric.Shapes.Shape.t(), Keyword.t()) :: :ok

remove_shape(shape_handle, t)

@callback remove_shape(shape_handle(), Keyword.t()) :: :ok

wait_for_restore(t)

@callback wait_for_restore(Keyword.t()) :: :ok

Functions