Skip to content

brianmarting/go-backend

Repository files navigation

Go-backend

What does the application do?

The application manages all kinds of cryptocurrency related data.
By default when running, it will:

  • create tables
  • try to connect to psql
  • try to connect to rabbitmq and create queues in order to listen for withdrawal requests
  • sets up a tcp server on the given port, listening for withdrawal requests from external parties
  • create a grpc stream to receive requests

Running

When running the application, you will need to provide env variables. The following can be used:

DB_HOST=localhost;DB_PASSWORD=postgres;DB_USERNAME=postgres;ENVIRONMENT=dev;OTLP_ENDPOINT=127.0.0.1:4318;RABBITMQ_HOST=localhost;RABBITMQ_PASSWORD=guest;RABBITMQ_USERNAME=guest;TCP_WITHDRAWAL_LISTENER_PORT=8000;GRPC_PORT=8100

You also need to run the docker-compose.yml file in order to start the psql and the rabbitmq instance so that the application can start.

Tracing

Tracing is being done by using the otlphttptrace package, meaning that the application will send traces via http to the set location.
This being done in the otlp format, and is being sent to an otel collector. In the collector it is being logged and being forwarded in the same otlp format to the given ingester, in this case being jaeger.
This can be viewed when running the docker-compose.yml and going to http://localhost:16686/ (jaeger UI).

Grpc

When using grpc, run the command protoc --go_out=generated --go-grpc_out=generated *.proto in the grpc folder to generate the proto files.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published