pachyderm v0.2.1 Pachyderm.Entity behaviour

A Pachyderm.Entity describes the behaviour of a durable actor.

Implementations for handle/2 and update/2 must be provided. The init/0 callback is optional, if not provided the initial state will be nil

Link to this section Summary

Link to this section Types

Link to this type

event()

event() :: any()
Link to this type

message()

message() :: any()
Link to this type

state()

state() :: any()

Link to this section Functions

Link to this function

reduce(reference, events, initial_state)

Link to this section Callbacks

Link to this callback

handle(message, state)

handle(message(), state()) :: {:ok, [event()]}
Link to this callback

init()

(optional)
init() :: state()
Link to this callback

update(event, state)

update(event(), state()) :: state()