Packet Spec - njb-said/Godfrey GitHub Wiki

About Godfrey Packets

Packets are sent in JSON format through a Redis pub-sub channel.

Packet Layout - Sending

Each packet you send must contain the following:

  • packet the packet type you are sending
  • hostname the hostname of the server you want this packet to reach. Use * to send to all servers (use with caution!)
  • data a JSON object containing the packet data. See other wiki pages to learn what to put for each packet.

The Godfrey java application will only read and interpret the packet if the above fields are all present in the JSON object.

Packet Layout - Reading

Packets you receive back from the java application may be a little different.

The only notable change is the absence of the hostname field (as it isn't targeted at a server) and the presence of the machine field to tell you which server the packet came from.