ViewstampedReplication (viewstamped_replication v0.1.0)

Copy Markdown View Source

Protocol-generic Viewstamped Replication runtime.

Summary

Functions

command(group_id, operation, opts)

@spec command(term(), term(), keyword()) :: {:ok, term()} | {:error, term()}

primary(group_id, replica_id)

@spec primary(term(), term()) :: {:ok, term()} | {:error, :not_found}

snapshot(group_id, replica_id)

@spec snapshot(term(), term()) :: :ok | {:error, term()}

start_replica(opts)

@spec start_replica(keyword()) :: {:ok, pid()} | {:error, term()}

status(group_id, replica_id)

@spec status(term(), term()) :: {:ok, map()} | {:error, :not_found}

stop_replica(group_id, replica_id)

@spec stop_replica(term(), term()) :: :ok | {:error, :not_found}