diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-08-04 21:33:17 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-08-04 21:33:17 +0100 |
commit | 25eeaeeff47fae317735d93cf85cef74d22bdb0c (patch) | |
tree | e6e7e5a6ef057334f4468cf0afa86eb2b1a9b6c2 /plugins/mod_pubsub/mod_pubsub.lua | |
parent | dad630943d90af74bfb0eaf9c847168af8a087c9 (diff) | |
download | prosody-25eeaeeff47fae317735d93cf85cef74d22bdb0c.tar.gz prosody-25eeaeeff47fae317735d93cf85cef74d22bdb0c.zip |
mod_pubsub: Add comment to document nodestore/itemstore methods
Diffstat (limited to 'plugins/mod_pubsub/mod_pubsub.lua')
-rw-r--r-- | plugins/mod_pubsub/mod_pubsub.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua index 83ff0897..113ee2b3 100644 --- a/plugins/mod_pubsub/mod_pubsub.lua +++ b/plugins/mod_pubsub/mod_pubsub.lua @@ -25,6 +25,20 @@ function handle_pubsub_iq(event) return lib_pubsub.handle_pubsub_iq(event, service); end +-- An itemstore supports the following methods: +-- items(): iterator over (id, item) +-- get(id): return item with id +-- set(id, item): set id to item +-- clear(): clear all items +-- resize(n): set new limit and trim oldest items +-- tail(): return the latest item + +-- A nodestore supports the following methods: +-- set(node_name, node_data) +-- get(node_name) +-- users(): iterator over (node_name) + + local node_store = module:open_store(module.name.."_nodes"); local function create_simple_itemstore(node_config, node_name) |