api.hrl 895 B

123456789101112131415161718192021
  1. -ifndef(API_HRL).
  2. -define(API_HRL, true).
  3. -define(API,[start/0,stop/0,leave/0,leave/1,destroy/0,destroy/1,
  4. join/0,join/1,modules/0,cursors/0,get/2,get/3,put/1,put/2,index/3,index/4,
  5. match/1,match/2,index_match/2,index_match/3,key_match/2,key_match/3,
  6. delete/2,delete/3,delete_range/3,
  7. table/1,tables/0,dir/0,initialize/2,seq/2,all/1,all/2,count/1,ver/0]).
  8. -include("metainfo.hrl").
  9. -spec seq(atom() | [], integer() | []) -> term().
  10. -spec count(atom()) -> integer().
  11. -spec dir() -> list({'table',atom()}).
  12. -spec ver() -> {'version',string()}.
  13. -spec leave() -> ok.
  14. -spec destroy() -> ok.
  15. -spec join() -> ok | {error,any()}.
  16. -spec join(Node :: string()) -> [{atom(),any()}].
  17. -spec modules() -> list(atom()).
  18. -spec cursors() -> list({atom(),list(atom())}).
  19. -spec tables() -> list(#table{}).
  20. -spec table(Tab :: atom()) -> #table{} | false.
  21. -endif.