ViewstampedReplication.Protocol.Event (viewstamped_replication v0.1.0)

Copy Markdown View Source

Events accepted by the pure protocol transition function.

Summary

Types

client_route()

@type client_route() :: term()

op_number()

@type op_number() :: non_neg_integer()

recovered_state()

@type recovered_state() :: term()

replica_id()

@type replica_id() :: term()

result()

@type result() :: term()

t()

@type t() ::
  {:client_request, client_route(), ViewstampedReplication.Request.t()}
  | {:peer_message, replica_id(), ViewstampedReplication.Protocol.Envelope.t()}
  | {:timeout, timer_kind(), timer_token()}
  | {:state_machine_applied, op_number(), result()}
  | {:snapshot_completed, op_number(), snapshot :: term()}
  | {:storage_recovered, recovered_state()}
  | {:storage_failed, term()}

timer_kind()

@type timer_kind() :: atom()

timer_token()

@type timer_token() :: term()