Skip to content

Latest commit

 

History

History
114 lines (84 loc) · 1.84 KB

messages.md

File metadata and controls

114 lines (84 loc) · 1.84 KB

messages

The messages are mostly "orders", "do execute", "do task", "do receive".

There are messages whose point is to convey an event. "failed", "launched", "terminated".

Event messages are logged in the msgs.log. Event messages are transmitted to subscribers as well.

execute

"execute" filenames are prefixed with "exe_".

{
  point: "execute",
  exid: "xxx", // execution id
  nid: "xxx", // node id
  tree: [ "task", { "_0": "stamp" }, [] ],
  payload: { color: "blue" }
}

"vars" may be set, making the node a "scope":

{
  point: "execute",
  exid: "xxx", // execution id
  nid: "xxx", // node id
  tree: [ "task", { "_0": "stamp" }, [] ],
  payload: { color: "blue" },
  vars: { x: "hello", y: "world" }
}

task

"task" filenames are prefixed with "tsk_".

{
  point: "task",
  exid: "xxx",
  nid: "yyy",
  tree: [ "task", { "_0": "stamp" }, [] ],
  payload: { color: "blue" }
}

return

Return files are written by tasker implementations. They contain the raw payload of the tasker's reply. The dispatcher turns that ret_ file into a regular receive "rcv_" file.

The dispatcher determines the nid (and exid) of the return by its filename.

{
  // ... payload ...
}

receive

"receive" filenames are prefixed with "rcv_".

{
  point: "receive",
  exid: "xxx",
  nid: "yyy",
  from: "zzz",
  payload: { color: "red" }
}

schedule

"schedule" filenames are prefixed with "sch_".

{
  point: "schedule",
  at: "20141128.103239", // seconds (not below)
  //cron: "* * * * *", // minutes (not seconds)
  exid: "xxx",
  nid: "yyy", // identify scheduler
  msg: { point: "receive", exid: "aaa", nid: "bbb", ... }
    // identify scheduled
}
{
  point: "unschedule",
  at: "20141128.105313",
  exid: "xxx",
  nid: "0_2"
}

launched

"evt_"

TODO

terminated

TODO

failed

TODO