View Source Electric.Shapes (electric v0.9.5)

Summary

Functions

Clean up all data (meta data and shape log + snapshot) associated with the given shape handle

Get the last exclusive offset of the chunk starting from the given offset

Get stream of the log since a given offset

Get or create a shape handle and return it along with the latest offset of the shape

Get the shape that corresponds to this shape definition and return it along with the latest offset of the shape

Get snapshot for the shape handle

Check whether the log has an entry for a given shape handle

Types

Functions

Link to this function

clean_shape(shape_handle, opts \\ [])

View Source
@spec clean_shape(
  shape_handle(),
  keyword()
) :: :ok

Clean up all data (meta data and shape log + snapshot) associated with the given shape handle

Link to this function

clean_shapes(shape_handles, opts \\ [])

View Source
@spec clean_shapes(
  [shape_handle()],
  keyword()
) :: :ok
Link to this function

get_chunk_end_log_offset(config, shape_handle, offset)

View Source
@spec get_chunk_end_log_offset(
  keyword(),
  shape_handle(),
  Electric.Replication.LogOffset.t()
) ::
  Electric.Replication.LogOffset.t() | nil

Get the last exclusive offset of the chunk starting from the given offset

If nil is returned, chunk is not complete and the shape's latest offset should be used

Link to this function

get_log_stream(config, shape_handle, opts)

View Source

Get stream of the log since a given offset

Link to this function

get_or_create_shape_handle(config, shape_def)

View Source
@spec get_or_create_shape_handle(
  keyword(),
  Electric.Shapes.Shape.t()
) :: {shape_handle(), Electric.Replication.LogOffset.t()}

Get or create a shape handle and return it along with the latest offset of the shape

Link to this function

get_shape(config, shape_def)

View Source

Get the shape that corresponds to this shape definition and return it along with the latest offset of the shape

Link to this function

get_snapshot(config, shape_handle)

View Source

Get snapshot for the shape handle

Link to this function

has_shape?(config, shape_handle)

View Source
@spec has_shape?(
  keyword(),
  shape_handle()
) :: boolean()

Check whether the log has an entry for a given shape handle