View on GitHub

cps

CPS Feed Server for KVS

KVS Feeds

Generic KVS feed-server

Overview

Feed server for KVS abstract database middleware.

Implements database queries in the form of atomic operations or in other words, provides transaction for KVS-feeds logic.

Dependency

Configuration

sys.config

Api

Usage

R=#post{},
{ok,R2}=kvs_feeds:append(R),
Link = 1000,
FunUpdate=fun(#post{links=Links}=P) -> {ok,P#post{links=lists:usort([Link | Links])}} end,
{ok,R3}=kvs_feeds:update(R2,FunUpdate),
     ok=kvs_feeds:delete(R3),
        kvs_feeds:purge(R3,fun() -> [{feed,attachment,fun kvs_feeds:delete/1}] end),

Credits