Skip to content
Emil Axelsson edited this page Jan 18, 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)

GuiProcessStatus

  • processId (int)
  • applicationId (string)
  • clusterId (string)
  • nodeStatus (map from node id) (always data for all nodes)
    • (string, "Starting", "Running", "NormalExit", "CrashExit", "FailedToStart", "TimedOut", "WriteError", "ReadError", "UnknownError")
  • status (string, "Starting", "Running", "Exit", "PartialExit", "CrashExit")

GuiProcessLogMessage

  • processId (int)
  • stdOut (string)
  • stdErr (string)

GUI to Core

GuiCommand

  • applicationId
  • command (string, "start", "kill", "exit", "restart")
  • configuration (string)

Clone this wiki locally