Listener - S41nz/TBTAF GitHub Wiki
TBTAF Listener
Overview
Service that can be listening to the changes submitted to a given source code repos and send the notifications to the Orchestrator to trigger commands that may apply depending on a given criteria (triggers).
API Specification
AddRepoListener
-
Inputs
- Reference to a previously created ListenerParameters instance which will contain the following information: ProjectID to which the listener service corresponds to, server side path to the repo, local filepath to the repo, applicable credentials for accessing the repository services and metadata and finally the repository type (E.g. GIT,SVN,etc).
-
Outputs
- If everything goes fine during the Listener service creation, then a reference to the corresponding RepoListener instance will be returned.
-
Exceptions
- If a None is provided as ListenerParameters reference, then an Invalid Argument Exception will be thrown.
- If any of the information contained within the ListenerParameters is invalid, then a special Invalid Listener Parameter exception will be thrown with a concatenated message elaborating which specific part of the parameter information is incorrect.
RemoveRepoListener
-
Inputs
- Reference to the RepoListener instance that was previously created and it is required to be removed from the Listener service.
-
Outputs
- N/A
-
Exceptions
- In case that a None is provided or a non-subscribed RepoListener instance is submitted then an Invalid Argument Exception will be thrown.
Init
-
Inputs
- An optional string containing the file path to a Listener control file that will initialize all the parameters for the Listener service once the listener instance has been launched.
-
Outputs
- N/A
-
Exceptions
- In case that there is a non-existent nor readable location provided as the Listener control file. An Invalid Argument Exception will be thrown.