Module match_stream_db

Match Stream Database main interface.

Copyright (C) 2011 Inaka Labs SRL

Behaviours: supervisor.

Authors: Fernando Benavides (fernando.benavides@inakanetworks.com).

Description

Match Stream Database main interface.

Function Index

create/1Creates a match or an user.
event_log/1Logs an event.
match/1Returns a match.
match_all/0Returns the list of available matches.
match_delete/1Deletes a match.
match_history/1Returns match events.
match_update/2Updates an existing match.
user/1Returns an user.
user_all/0Returns the list of available users.
user_delete/1Deletes an user.
user_update/2Updates an existing user.

Function Details

create/1

create(Object::match_stream:match() | match_stream:user()) -> ok

throws duplicated

Creates a match or an user

event_log/1

event_log(Event::match_stream:event()) -> ok

throws not_found

Logs an event

match/1

match(MatchId::match_stream:match_id()) -> match_stream:match() | not_found

Returns a match

match_all/0

match_all() -> [match_stream:match_id()]

Returns the list of available matches

match_delete/1

match_delete(MatchId::match_stream:match_id()) -> ok

Deletes a match. Silently ignores the call if the match is not there

match_history/1

match_history(MatchId::match_stream:match_id()) -> [match_stream:event()]

Returns match events

match_update/2

match_update(MatchId::match_stream:match_id(), UpdateFun::fun((match_stream:match()) -> match_stream:match())) -> ok

throws not_found

Updates an existing match

user/1

user(UserId::match_stream:user_id()) -> match_stream:user() | not_found

Returns an user

user_all/0

user_all() -> [match_stream:user_id()]

Returns the list of available users

user_delete/1

user_delete(UserId::match_stream:user_id()) -> ok

Deletes an user. Silently ignores the call if the user is not there

user_update/2

user_update(UserId::match_stream:user_id(), UpdateFun::fun((match_stream:user()) -> match_stream:user())) -> ok

throws not_found

Updates an existing user


Generated by EDoc, Sep 21 2011, 16:21:48.