Issho.Store.Memory (Issho v0.1.0)

Copy Markdown View Source

A store in memory, for development and tests. It outlives a document's authority, but loses everything when its node stops.

children = [
  {Issho.Store.Memory, name: MyApp.CollabStore},
  {Issho, name: MyApp.Issho, store: {Issho.Store.Memory, MyApp.CollabStore}, ...}
]

content/2 reads a document's content as last saved, for tests.

Summary

Functions

The content of a document as last saved, or nil.

Starts a store. Options: :name.

Functions

content(store, id)

@spec content(Agent.agent(), String.t()) :: term()

The content of a document as last saved, or nil.

start_link(opts)

@spec start_link(keyword()) :: Agent.on_start()

Starts a store. Options: :name.