Building the TAVM Input and Transformation Adapters
The TAVM input and transformation adapters are written in Python and Golang. Ensure that a working Python and Golang installation is available on your system (see prerequisites).
Usually, the adapters are built automatically when the TAVM core application instantiates them. You can still build the adapters manually using the following instructions.
Python Adapters
The Python adapters are located in the plugins/[sources|transformers] directory. Adapters can use the provided library
to communicate with the TAVM core application. The library can be found in the plugins/lib/python directory.
The adapters itself do not need to be compiled. They can be run directly using the Python interpreter or using the provided
run.sh script.
Setting up the Python library
The Python library is located in plugins/lib/python and uses venv to manage the dependencies.
Use the provided setup.sh script to create a virtual environment and install the dependencies.
cd plugins/lib/python
./setup.sh
Golang Adapters
Golang adapters use a provided library to communicate with the TAVM core application. The library can be found in the
plugins/lib/go directory.
Each Go adapter needs to be compiled prior to usage. TAVM core handles the compilation of the adapters automatically if
the adapters are started via the provided run.sh script.
The run.sh script simply builds a binary with the same name as the adapter folder and executes it.
cd plugins/[sources|transformers]/[adapter]
executable=${PWD##*/}
go build -o $executable .
Debugging Golang Adapters
You can set an environment variable to enable debugging for Golang adapters.
The variable is called TAVM_DEBUG_GO and needs to be set to true.
Once the TAVM core application starts an adapter, it will automatically attach a debugger to the adapter process. The debugger is listening on a random port in the range of 331-3399. Check the log output of the TAVM core application to find out which port is used for the adapter process.