Skip to content

Interface Modules

Chris edited this page Oct 23, 2018 · 1 revision

The interface modules can be overridden by using environment variables. Check the config.js file nested inside the api folder for details. There are four interface types, with each type performing a mandatory implementation that Manticore relies on for operation. Here are the four types and their default modules:

Job Interface

This is the most complex of the interface types. Manticore uses this module to get possible job types when the GET /job API is called, for POST /job validation, for job submission, for updating the state of a user’s request, and for getting and setting other data. Default module is manticore.

Logger Interface

Provides different logging levels used by Manticore to report information of different severities. Currently debug, info, warn, and error are the types of logs that Manticore uses. Default module is winston

Store Interface

Allows access to a persistent KV (Key Value) store. The store interface must be a KV store and must be able to provide a CAS (Check and set) implementation, along with the ability to watch changes in the store. Note that “get” is not an exported function and so the CAS or watch methods must be used to get data. Default module is consul-kv.

Websocket Interface

Allows communication between Manticore and a client over websockets. The module is also responsible for assigning user requests to passcodes and websockets. The passcodes are a form of authentication for a client, so that Manticore understands which client corresponds to which request. Default module is simple.