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
@type shape_handle() :: Electric.ShapeCacheBehaviour.shape_handle()
Functions
@spec clean_shape( shape_handle(), keyword() ) :: :ok
Clean up all data (meta data and shape log + snapshot) associated with the given shape handle
@spec clean_shapes( [shape_handle()], keyword() ) :: :ok
@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
Get stream of the log since a given offset
@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
@spec get_shape( keyword(), Electric.Shapes.Shape.t() ) :: {shape_handle(), Electric.Replication.LogOffset.t()} | nil
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
@spec has_shape?( keyword(), shape_handle() ) :: boolean()
Check whether the log has an entry for a given shape handle