Ferricstore.Commands.TopK (ferricstore v0.4.3)

Copy Markdown View Source

Handles Top-K commands routed through Raft for replication.

Write commands (TOPK.RESERVE, TOPK.ADD, TOPK.INCRBY) route through Raft via store.prob_write. Read commands (TOPK.QUERY, TOPK.LIST, TOPK.COUNT, TOPK.INFO) use stateless pread NIFs on local files.

Summary

Functions

handle(cmd, args, store)

@spec handle(binary(), [binary()], map()) :: term()

handle_ast(arg, store)

@spec handle_ast(term(), map()) :: term()

nif_delete(key, store)

@spec nif_delete(binary(), map()) :: :ok | {:error, term()}