Skip to content
Emil Axelsson edited this page Feb 20, 2017 · 32 revisions

Welcome to the C-Troll wiki!

Configuration

Config

  • applicationPath (string)
  • clusterPath (string)
  • listeningPort (int)

Application

Files named: <id>.json, where id is the application id.

  • name (string)
  • executable (string)
  • baseDirectory (string)
  • commandlineParameters (string)
  • currentWorkingDirectory (string)
  • tags (array of strings)
  • configuration (map from id (string) to object)
    • name
    • commandlineParamters
  • clusters (array of strings, clusterId's)

Cluster

Files named: <id>.json, where id is the cluster id.

  • name (string)
  • enabled (bool)
  • nodes (map from id (string) to object)
    • name (string)
    • ip (string)
    • port (string)

Messages

This document describes the stucture of messages being passed between the three parts of C-Troll (GUI, Core & Tray)

Core to Tray

TrayCommand

Used to start / stop processes.

  • id (int)
  • command (string: "Start" / "Kill" / "Exit")
  • executable (string)
  • baseDirectory (string)
  • currentWorkingDirectory (string)
  • commandlineParameter (string)
  • environmentVariables (string NAME,VALUE;NAME,VALUE)

Tray to Core

TrayProcessLogMessage

Sent whenever the tray receives a log message from any running process.

  • processId (int, The process identifier)
  • stdOutLog (string)
  • stdErrorLog (string)

TrayProcessStatus

Sent whenever a process started or terminated.

  • processId (int, The process identifier)
  • status (string, "Running", "NormalExit", "CrashExit", "FailedToStart", "TimedOut", "WriteError", "ReadError", "UnknownError")

Core to GUI

GuiInit

Sent whenever there is new information about applications/clusters.

  • applications (array)
    • id (string)
    • name (string)
    • tags (array of strings)
    • clusters (array of strings (cluster id's)
    • configurations (array of objects)
      • id
      • name
  • clusters (array)
    • id (string)
    • name (string)
    • enabled (bool)
    • nodes (array of objects)
      • id
      • name
  • processes (array of objects)
    • id (int)
    • applicationId (string)
    • configurationId (string)
    • clusterId (string)
    • time
    • nodeStatusHistory - status (string, "Starting", "Running", "NormalExit", "CrashExit", "FailedToStart", "TimedOut", "WriteError", "ReadError", "UnknownError") - time (double) - node (string)
    • clusterStatus (string, "Starting", "Running", "Exit", "PartialExit", "CrashExit")
    • clusterStatusTime (double)

GuiProcessStatus

  • processId (int)
  • applicationId (string)
  • clusterId (string)
  • nodeStatus (map from node id) (usually just one node)
    • time (double)
    • (string, "Starting", "Running", "NormalExit", "CrashExit", "FailedToStart", "TimedOut", "WriteError", "ReadError", "UnknownError")
  • clusterStatus (string, "Starting", "Running", "Exit", "PartialExit", "CrashExit")

GuiProcessLogMessage

  • time (double)
  • processId (int)
  • applicationId (string)
  • clusterId (string)
  • message (string)
  • node (string, node id)
  • type (string, "stdout" or "stderr")

GuiProcessLogMessageHistory

  • time
  • processId (int)
  • applicationId (string)
  • clusterId (string)
  • logMessages (map from nodeId)
    • message (string)
    • time (double)
    • type (string, "stdout" or "stderr")

GUI to Core

GuiStartCommand

  • applicationId
  • configuration (string)

GuiProcessCommand

  • processId
  • command (string, "Restart" or "Stop")

Clone this wiki locally