Telecom team isn't maintaining this repo, instead we are using Telecom Microservice Generator.
Give a high level explanation of what your service does.
Explain the business requirement it solves, explaining more about the process that end users might follow with your service.
And a brief overview of how an end user would interact with your service.
To install, run go get, then follow build instructions from the new directory.
go get github.com/utilitywarehouse/my-new-service
cd ~/go/src/github.com/utilitywarehouse/my-new-service- A DB
- A Kafka topic
- Another Service
This should cover more technical details of how your service is actually run, this includes CLI options, Endpoints for an API, and Prometheus metrics.
--port=8080 The port to listen on for HTTP connections ($HTTP_PORT)
--opsPort=8081 The port to listen on for HTTP connections for Ops ($OPS_PORT)What if any ports are exposed, and used to interact with your app. These should be the external ports that kubernets exposes.
80/443
Is this an API that has endpoints? If so list endpoints, broken by their httpMethod. For Post methods describe what the route returns, for routes with variable endings, give an example. For Post/Put methods give a curl example.
/api/v1/get
Returns wonderful data
/api/v1/get/{something}
Returns something
Eg. /api/v1/get/thisIsSomething
/api/v1/post
Post some data to this route
curl -X "POST" "http://localhost:8080/api/v1/post" \
-H "Content-Type: application/json" \
-d $'{
"data": "some data"
}'What are the Prometheus metrics that have been implemented? Explaining which metrics are performance vs error metrics, to help others diagnosis your service.
TotalJobs
Total number of jobs run
ErrCount
The total number of errors
go get -u -t ./...
go build cmd/my-new-service/main.goFor circle build instructions see the Circle build README
Are there any steps that need to be taken before a user is able to run your tests?
For example dependant containers to spin up via the docker-compose file, or environmental variables that need to be exported.
Set DB_CONNECTION_STRING to localhost
export DB_CONNECTION_STRING=localhost
go test ./...