Prometheus metrics 接入
运行prometheus
window用户 需要将prometheus.yml中的layotto改成'docker.for.windows.localhost:34903'
cd ${project_path}/demo/prometheus
docker-compose -f prometheus-docker-compose.yaml up -d
运行layotto
可以按照如下方式启动一个layotto的server:
切换目录:
cd ${project_path}/cmd/layotto
构建:
go build -o layotto
运行:
./layotto start -c ../../configs/config_standalone.json
运行 Demo
对应的调用端代码在client.go 中,运行它会调用layotto的SayHello接口:
切换目录:
cd ${project_path}/demo/flowcontrol/