Electric.Shapes.Consumer (electric v1.6.2)

Copy Markdown View Source

Summary

Types

initialize_shape_opts()

@type initialize_shape_opts() :: %{
  :action => :create | :restore,
  optional(:otel_ctx) => Electric.Telemetry.OpenTelemetry.otel_ctx() | nil,
  optional(:feature_flags) => [binary()],
  optional(:is_subquery_shape?) => boolean()
}

Functions

activate_mocked_functions_from_test_process()

await_snapshot_start(stack_id, shape_handle, timeout \\ 45000)

@spec await_snapshot_start(Electric.stack_id(), Electric.shape_handle(), timeout()) ::
  :started | {:error, any()}

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

initialize_shape(consumer_pid, shape, opts)

@spec initialize_shape(pid(), Electric.Shapes.Shape.t(), initialize_shape_opts()) ::
  :ok

name(stack_id, shape_handle)

process_buffered_txn_fragments(state)

register_for_changes(stack_id, shape_handle)

start_link(config)

stop(pid, reason)

stop(stack_id, shape_handle, reason)

subscribe_materializer(stack_id, shape_handle, pid)

@spec subscribe_materializer(Electric.stack_id(), Electric.shape_handle(), pid()) ::
  {:ok, Electric.Replication.LogOffset.t()}

whereis(stack_id, shape_handle)

@spec whereis(Electric.stack_id(), Electric.shape_handle()) :: pid() | nil