Module cloudi_service_db

CloudI Database

Provide a simple in-memory database.

Copyright © 2013-2015 Michael Truog

Version: 1.5.1 Dec 23 2015 14:15:25 ------------------------------------------------------------------------

Behaviours: cloudi_service.

Authors: Michael Truog (mjtruog [at] gmail (dot) com).

Description

CloudI Database

Provide a simple in-memory database.

Data Types

agent()

agent() = cloudi:agent()

service_name()

service_name() = cloudi:service_name()

timeout_milliseconds()

timeout_milliseconds() = cloudi:timeout_milliseconds()

Function Index

cloudi_service_handle_info/3
cloudi_service_handle_request/11
cloudi_service_init/4
cloudi_service_terminate/3
kv_delete/4

Delete all table values in the key-value db.

.
kv_delete/5

Delete a value in the key-value db.

.
kv_get/4

Retrieve all table values in the key-value db.

.
kv_get/5

Retrieve a table value in the key-value db.

.
kv_new/5

Store a new value in the key-value db.

.
kv_put/6

Store a table value in the key-value db.

.

Function Details

cloudi_service_handle_info/3

cloudi_service_handle_info(Request, State, Dispatcher) -> any()

cloudi_service_handle_request/11

cloudi_service_handle_request(Type, Name, Pattern, RequestInfo, Request, Timeout, Priority, TransId, Pid, State, Dispatcher) -> any()

cloudi_service_init/4

cloudi_service_init(Args, Prefix, Timeout, Dispatcher) -> any()

cloudi_service_terminate/3

cloudi_service_terminate(Reason, Timeout, State) -> any()

kv_delete/4

kv_delete(Agent::agent(), Name::service_name(), Table::string() | binary(), Timeout::timeout_milliseconds()) -> {ok, NewAgent::agent()} | {{error, any()}, NewAgent::agent()}

Delete all table values in the key-value db.

kv_delete/5

kv_delete(Agent::agent(), Name::service_name(), Table::string() | binary(), Key::binary(), Timeout::timeout_milliseconds()) -> {ok, NewAgent::agent()} | {{error, any()}, NewAgent::agent()}

Delete a value in the key-value db.

kv_get/4

kv_get(Agent::agent(), Name::service_name(), Table::string() | binary(), Timeout::timeout_milliseconds()) -> {{ok, [{Key::binary(), Value::any()}]}, NewAgent::agent()} | {{error, any()}, NewAgent::agent()}

Retrieve all table values in the key-value db.

kv_get/5

kv_get(Agent::agent(), Name::service_name(), Table::string() | binary(), Key::binary(), Timeout::timeout_milliseconds()) -> {{ok, Key::binary(), Value::any()}, NewAgent::agent()} | {{error, any()}, NewAgent::agent()}

Retrieve a table value in the key-value db.

kv_new/5

kv_new(Agent::agent(), Name::service_name(), Table::string() | binary(), Value::any(), Timeout::timeout_milliseconds()) -> {{ok, Key::binary(), NewValue::any()}, NewAgent::agent()} | {{error, any()}, NewAgent::agent()}

Store a new value in the key-value db.

kv_put/6

kv_put(Agent::agent(), Name::service_name(), Table::string() | binary(), Key::binary(), Value::any(), Timeout::timeout_milliseconds()) -> {{ok, Key::binary(), Value::any()}, NewAgent::agent()} | {{error, any()}, NewAgent::agent()}

Store a table value in the key-value db.


Generated by EDoc, Dec 23 2015, 14:15:25.