(pronounced "tuh-laa-ree-uh")
Talaria's primary function is to interact with the devices: forwarding device events and sending requests to the device then forwarding the response. The communication with the device happens over a websocket using WRP Messages.
This project and everyone participating in it are governed by the XMiDT Code Of Conduct. By participating, you agree to this Code.
Talaria's primary function is to interact with the devices. The communication with the device happens over a websocket using WRP Messages.
Talaria can send events originating from the device as well as emit its own events. When this occurs, the event is sent to Caduceus.
Talaria has three API endpoints to interact with the devices connected to itself. A XMiDT cloud client should not directly query against a talaria. Instead, they should send a request through scytale.
This will return the statistics of the connected device, including information such as uptime and bytes sent. This request does not communicate with the device, instead the request returns stored statistics.
This will return a list of all the actively connected devices and their statistics,
just like the stat
command.
This will send a WRP message to the device.
Talaria will accept a WRP message encoded in a valid WRP representation - generally msgpack
or json
.
If the message is json
encoded, talaria will encode the payload as msgpack
.
Talaria will then forward the message to the device.
If the device returns a message, it will be encoded as the HTTP accept
header.
msgpack
is the default encoding of the wrp message.
A secondary function of talaria is to control the connected devices. This allows for the flow of devices to go towards specific talarias. In other words, where the websockets are made can be controlled. For more information refer to Control Server Docs.
This will allow or deny devices to connect to the talaria instance.
This will remove the connected devices from the talaria instance.
In order to build from the source, you need a working Go environment with version 1.11 or greater. Find more information on the Go website.
You can directly use go get
to put the Talaria binary into your GOPATH
:
GO111MODULE=on go get github.com/xmidt-org/talaria
You can also clone the repository yourself and build using make:
mkdir -p $GOPATH/src/github.com/xmidt-org
cd $GOPATH/src/github.com/xmidt-org
git clone git@github.com:xmidt-org/talaria.git
cd talaria
make build
The Makefile has the following options you may find helpful:
make build
: builds the Talaria binarymake rpm
: builds an rpm containing Talariamake docker
: builds a docker image for Talaria, making sure to get all dependenciesmake local-docker
: builds a docker image for Talaria with the assumption that the dependencies can be found alreadymake test
: runs unit tests with coverage for Talariamake clean
: deletes previously-built binaries and object files
The docker image can be built either with the Makefile or by running a docker command. Either option requires first getting the source code.
See Makefile on specifics of how to build the image that way.
For running a command, either you can run docker build
after getting all
dependencies, or make the command fetch the dependencies. If you don't want to
get the dependencies, run the following command:
docker build -t talaria:local -f deploy/Dockerfile .
If you want to get the dependencies then build, run the following commands:
GO111MODULE=on go mod vendor
docker build -t talaria:local -f deploy/Dockerfile.local .
For either command, if you want the tag to be a version instead of local
,
then replace local
in the docker build
command.
A helm chart can be used to deploy talaria to kubernetes
helm install xmidt-talaria deploy/helm/talaria/
For deploying a XMiDT cluster refer to getting started.
For running locally, ensure you have the binary built. If it's in
your GOPATH
, run:
talaria
If the binary is in your current folder, run:
./talaria
Refer to CONTRIBUTING.md.