Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Latest commit

 

History

History

alternate-example

Demo services

How to run

docker-compose up -d - executed in root folder will start Jaeger

make run - executed in workshop and subworkshop folders will start the services

API usage example

## AcceptCar
curl -X "POST" "http://localhost:5381/v1/workshop/cars" \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
"number": "ABCD4242",
"owner": "Mr. Smith",
"body_style": "SEDAN",
"color": "red"
}'

## PaintCar
curl -X "PUT" "http://localhost:5381/v1/workshop/cars/ABCD4242/paint" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "desired_color": "green"
}'

## RetrieveCar
curl "http://localhost:5381/v1/workshop/cars/ABCD4242"

After doing some requests you can see the traces in local Jaeger if it was run

You can retrieve useful information from services, e.g.

## metrics
curl "http://localhost:5382/metrics"

## config
curl "http://localhost:5382/self/config"

## build
curl "http://localhost:5382/self/build"

## vars
curl "http://localhost:5382/internal/debug/vars"

Some probably useful pictures

Fx DI in 10 seconds: fx dependency injection

PaintCar workflow: paint car