neuron v0.8.0 Neuron.Store

This module provides a simple way to interface with the process and application environmental variables, acting as a simple KV store.

WARNING: this module is not intended to be used outside of this library.

Summary

Functions

gets the context of a given neuron application/process environmental variable

deletes neuron application/process environmental variables

returs neuron application/process environmental variables

sets neuron application/process environmental variables

Functions

current_context(key)
current_context(key :: atom) :: :global | :process

gets the context of a given neuron application/process environmental variable

Examples

iex> Neuron.Store.current_context(:my_key) :global

delete(key)
delete(key :: atom) :: any

deletes neuron application/process environmental variables

Examples

iex> Neuron.Store.delete(:my_key) :ok

delete(atom, key)
delete(context :: :global | :process, key :: atom) :: :ok
get(key)
get(key :: atom) :: any

returs neuron application/process environmental variables

Examples

iex> Neuron.Store.set(:my_key, “value”) :ok iex> Neuron.Store.get(:my_key) “value”

get(context, key)
get(context :: :global | :process, key :: atom) :: any
get(atom, key, default)
get(context :: :global | :process, key :: atom, default :: any) :: any
set(key, value)
set(context :: :global | :process, value :: keyword) :: :ok
set(key :: atom, value :: any) :: :ok

sets neuron application/process environmental variables

Examples

iex> Neuron.Store.set(:my_key, “value”) :ok

set(atom, key, value)