CommandMap¶
Usage
use CommandMap;
or
import CommandMap;
- proc akMsgSign(cmd: string, msgArgs: borrowed MessageArgs, st: borrowed SymTab): MsgTuple throws¶
This is a dummy function to get the signature of the Arkouda
server FCF. Ideally, the func() function would be able to
construct the FCF type, but there is no way to generate a
FCF that throws using func() today.
- proc akBinMsgSign(cmd: string, msgArgs: borrowed MessageArgs, st: borrowed SymTab): bytes throws¶
Just like akMsgSign, but Messages which have a binary return
require a different signature
- proc arrayMsgSign(cmd: string, msgArgs: borrowed MessageArgs, ref data: bytes, st: borrowed SymTab): MsgTuple throws¶
- var commandMap: map(string, f.type)¶
- var commandMapBinary: map(string, b.type)¶
- var commandMapArray: map(string, a.type)¶
- var moduleMap: map(string, string)¶
- var usedModules: set(string)¶
- proc registerFunction(cmd: string, fcf: f.type)¶
Register command->function in the CommandMap
This binds a server command to its corresponding function matching the standard
function signature & MsgTuple return type
- proc registerFunction(cmd: string, fcf: f.type, modName: string)
- proc writeUsedModules(fmt: string = "cfg")¶
- proc registerBinaryFunction(cmd: string, fcf: b.type)¶
Register command->function in the CommandMap for Binary returning functions
This binds a server command to its corresponding function matching the standard
function signature but returning “bytes”
- proc registerBinaryFunction(cmd: string, fcf: b.type, modName: string)
- proc registerArrayFunction(cmd: string, fcf: a.type)¶
- proc dumpCommandMap(): string throws¶
Dump the combined contents of the command maps as a single json encoded string
- proc executeCommand(cmd: string, msgArgs, st) throws¶