View Source Actors.Actor.StateManager (spawn v1.0.0-rc1)

StateManager Implements behavior that allows an Actor's state to be saved to persistent storage using database drivers.

Link to this section Summary

Link to this section Functions

Link to this function

is_new?(old_hash, new_state)

View Source
@spec load(Eigr.Functions.Protocol.Actors.ActorId.t()) :: {:ok, any()}
@spec save(
  Eigr.Functions.Protocol.Actors.ActorId.t(),
  Eigr.Functions.Protocol.Actors.ActorState.t()
) ::
  {:ok, Eigr.Functions.Protocol.Actors.ActorState.t()}
  | {:error, any(), Eigr.Functions.Protocol.Actors.ActorState.t()}
Link to this function

save_async(actor_id, state, timeout \\ 5000)

View Source