View Source Electric.ShapeCache.ShapeStatusBehaviour behaviour (electric v0.9.5)

Behaviour defining the ShapeStatus functions to be used in mocks

Summary

Types

Callbacks

@callback add_shape(Electric.ShapeCache.ShapeStatus.t(), Electric.Shapes.Shape.t()) ::
  {:ok, shape_handle()} | {:error, term()}
Link to this callback

get_existing_shape(t, arg2)

View Source
@callback initialise(Electric.ShapeCache.ShapeStatus.options()) ::
  {:ok, Electric.ShapeCache.ShapeStatus.t()} | {:error, term()}
Link to this callback

initialise_shape(t, shape_handle, xmin, t)

View Source
Link to this callback

mark_snapshot_started(t, shape_handle)

View Source
@callback mark_snapshot_started(Electric.ShapeCache.ShapeStatus.t(), shape_handle()) ::
  :ok
Link to this callback

remove_shape(t, shape_handle)

View Source
@callback remove_shape(Electric.ShapeCache.ShapeStatus.t(), shape_handle()) ::
  {:ok, Electric.Shapes.Shape.t()} | {:error, term()}
Link to this callback

set_latest_offset(t, shape_handle, t)

View Source
Link to this callback

set_snapshot_xmin(t, shape_handle, xmin)

View Source
@callback set_snapshot_xmin(Electric.ShapeCache.ShapeStatus.t(), shape_handle(), xmin()) ::
  :ok
Link to this callback

snapshot_started?(t, shape_handle)

View Source
@callback snapshot_started?(Electric.ShapeCache.ShapeStatus.t(), shape_handle()) ::
  boolean()