super_stack v0.1.0 SuperStack.Server View Source
Documentation for SuperStack.Server API.
SuperStack.Server maintains a list of values
as state. You can push and pop values to
and from state.
The current state can be obtained
via show.
State persists via a Cupboard.Server in a separate
process. SuperStack.Server gets it's state from the
Cupboard.Server.
SuperStack.Server's state is a list.
SuperStack.Server is supervised. If it fails it
will store it's current state in the Cupboard.Server
and restart using the stored state.
Link to this section Summary
Functions
pop an element off of the SuperStack.Server
push an element onto the SuperStack.Server
reset the SuperStack.Server's state to an empty list.
show the SuperStack.Server's current state
Link to this section Functions
pop an element off of the SuperStack.Server
Example
iex>SuperStack.Server.reset
:ok
iex>SuperStack.Server.push 1
:ok
iex>SuperStack.Server.show
[1]
iex>SuperStack.Server.pop
1
push an element onto the SuperStack.Server
Example
iex>SuperStack.Server.reset
:ok
iex>SuperStack.Server.push 1
:ok
iex>SuperStack.Server.show
[1]
reset the SuperStack.Server's state to an empty list.
Example
iex>SuperStack.Server.reset
iex>SuperStack.Server.push 1
:ok
iex>SuperStack.Server.show
[1]
iex>SuperStack.Server.reset
:ok
iex>SuperStack.Server.show
[]
show the SuperStack.Server's current state
Example
iex>SuperStack.Server.reset
iex>SuperStack.Server.show
[]