Electric.ShapeCache.ShapeCleaner (electric v1.4.13)

View Source

Removes a shape (consumer, status entry, on-disk data and publication entry) on demand.

Summary

Types

reason()

@type reason() :: {:shutdown, :cleanup} | {:shutdown, :suspend} | term()

shape_handle()

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

stack_id()

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

Functions

activate_mocked_functions_from_test_process()

consumer_cleanup_reason()

consumer_suspend_reason()

handle_writer_termination(stack_id, shape_handle, reason)

@spec handle_writer_termination(stack_id(), shape_handle(), reason()) ::
  :removed | :ok

remove_shape(stack_id, shape_handle, reason \\ {:shutdown, :cleanup})

@spec remove_shape(stack_id(), shape_handle(), term()) :: :ok | {:error, term()}

remove_shape_async(stack_id, shape_handle)

@spec remove_shape_async(stack_id(), shape_handle()) :: :ok

remove_shape_storage_async(stack_id, shape_handles)

@spec remove_shape_storage_async(stack_id(), [shape_handle()]) :: :ok

remove_shapes(stack_id, shape_handles, reason \\ {:shutdown, :cleanup})

@spec remove_shapes(stack_id(), [shape_handle()], term()) :: :ok | {:error, term()}

remove_shapes_async(stack_id, shape_handles)

@spec remove_shapes_async(stack_id(), [shape_handle()]) :: :ok

remove_shapes_for_relations(stack_id, relations, reason \\ {:shutdown, :cleanup})

@spec remove_shapes_for_relations([Electric.oid_relation()], stack_id(), term()) ::
  :ok