The Xmidt server for delivering events written in Go.
- Import the public GPG key (replace
0.0.1-65
with the release you want)
rpm --import https://github.com/Comcast/caduceus/releases/download/0.0.1-65/RPM-GPG-KEY-comcast-xmidt
- Install the rpm with yum (so it installs any/all dependencies for you)
yum install https://github.com/Comcast/caduceus/releases/download/0.0.1-65/caduceus-0.0.1-65.el6.x86_64.rpm
Docker containers make life super easy.
You will need SNS(or mock SNS) in order for Caduceus to work correctly.
- Docker (duh)
brew install docker
docker build -t caduceus:local .
This build.sh
script will build the binary and docker image
docker run -itd -p 6000:6000 -p 6001:6001 -p 6002:6002 -v `pwd`/temp/:/etc/caduceus --name caduceus caduceus:local
this assumes you have a folder temp
in your directory with a configuration file name caduceus aka caduceus.yaml
with
a port configuration like
primary:
address: ":6000"
health:
address: ":6001"
pprof:
address: ":6002"
You will need some other configuration to get everything running. Refer to example-caduceus.yaml for an example configuration
Once everything is up and running you can start sending requests. Bellow are a few examples.
curl -X POST \
http://localhost:6000/hook \
-H 'Authorization: Basic YXV0aEhlYWRlcg==' \
-H 'Content-Type: application/json' \
-d '{
"config": {
"url" : "http://127.0.0.1:9090/webhook2",
"content_type" : "application/json"
},
"events": [
".*"
],
"duration": 120,
"address": "127.0.0.1"
}'
curl -X POST \
http://localhost:6000/api/v3/notify \
-H 'Authorization: Basic YXV0aEhlYWRlcg==' \
-H 'Content-Type: application/msgpack' \
--data "@msg.bin"
where msg.bin
is a msgpack encoded json
curl -X GET \
http://localhost:6000/hooks \
-H 'Authorization: Basic YXV0aEhlYWRlcg=='
curl http://localhost:6001/health
GET some pprof stats
curl http://localhost:6002/debug/pprof/mutex