Skip to content

CaptChrisD/nerves_hub

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hub

Implements a heirarchial key-value store with publish/watch semanitcs at each node of the heirarchy. Part of the nerves framework.

Examples

Basic Usage:

# Start Hub
iex> Nerves.Hub.start
{:ok, #PID<0.127.0>}

# Put [status: :online] at path [:some, :point]
iex(2)> Nerves.Hub.put [:some,:point], [status: :online]
{:changes, {"05142ef7fe86a86D2471CA6869E19648", 1},
[some: [point: [status: :online]]]}

# Fetch all values at path [:some, :point]
Nerves.Hub.fetch [:some, :point]
{{"05142ef7fe86a86D2471CA6869E19648", 1}, [status: :online]}

# Get particular value :status at [:some, :point]
Nerves.Hub.get [:some, :point], :status
:online

About

Heirarchial key-value state store with pub-sub semantics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%