Categorygithub.com/fernandoocampo/basic-micro
repository
0.7.3
Repository: https://github.com/fernandoocampo/basic-micro.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

pets service

This is a service that provides an API for pets administration.

How to build?

from project folder run below commands, it will output binaries in ./bin/ folder

  • just build with current operating system.
make build
  • build for a linux distro operating system.
make build-linux

How to run a test environment quickly?

  1. make sure you have docker-compose installed.
  2. run the docker compose.
docker-compose up --build

or run this shortcut:

make run-local
  1. once you are done using the environment follow these steps.

    • ctrl + c
    • make clean-local

How to test?

from project folder run the following command

make test

or

go test -race ./...

Adding open telemetry

you can follow these instructions

go get "go.opentelemetry.io/otel" \
  "go.opentelemetry.io/otel/exporters/stdout/stdoutmetric" \
  "go.opentelemetry.io/otel/exporters/stdout/stdouttrace" \
  "go.opentelemetry.io/otel/propagation" \
  "go.opentelemetry.io/otel/sdk/metric" \
  "go.opentelemetry.io/otel/sdk/resource" \
  "go.opentelemetry.io/otel/sdk/trace" \
  "go.opentelemetry.io/otel/semconv/v1.21.0" \
  "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"