-
Notifications
You must be signed in to change notification settings - Fork 20
Guides | Rest API
In TANGO, there are two types of container.
- Main container :
Project Manager
, which coordinates other containers start and stop to proceed workflow. - Member containers: All containers except for
Project Manager
, which perform specific task in whole workflow.
Project Manager keeps the project details and coordinates the member containers task with start()/stop()
to start or stop the memeber container, while member containers report their status with status()
once start()
or stop()
is called.
As a whole workflow coordinator, the main container (Project Manager) should expose following APIs for member containers reports its current status:
status(from=<container_id>, status=<status>)
The member containers calls status()
to indicate theirs current status, where <status>
is one of the following values:
- "started" : report that container of
<container_id>
starts it task. - "running" : reports that container of
<container_id>
is running, reported at interval of<hb_period>
- "completed": reports that container of
<container_id>
finishes its task - "failed": reports that container of
<container_id>
fails or stopped.
All containers except for Project Manager should expose following APIs for Project Manager start/stop its workflow participant containers:
start(project_id=<project_id>, user_id=<user_id>, tb_interval=1000)
The Main continer calls start()
in order to make the member container start its task.
stop(project_id=<project_id>, user_id=<user_id>)
The Main continer calls stop()
in order to make the member container stop its task.
👉Note
- This page might contain some wide rendered images. If you want to see the whole contents with wider page, please use Wide GitHub extension of Chrome.
- If you are experiencing the error on rendered images due to the low-bandwith Internet delay, please use F5 function key for refreshing current page.