Skip to content

vandewilly/go-kit-sample

Repository files navigation

Go Kit Sample

The "go-kit-sample" repository is a demonstration of how to utilize the Go programming language and the go-kit framework to build microservices. This repository contains code that showcases the implementation of several common microservice functionalities such as service discovery, load balancing, and distributed tracing.

The code in this repository is well-organized and structured, making it easy to understand and modify for different use cases. It is also accompanied by detailed documentation that explains each component's purpose and how to use it.

Additionally, this repository includes sample code for creating and deploying microservices using Docker and Kubernetes. This is especially useful for those interested in containerization and orchestration of microservices.

Overall, this repository serves as a useful resource for developers looking to learn about microservices, the go-kit framework, and best practices for implementing them.

Build

docker compose up --detach

APIs

POST

Retail

curl --location 'http://localhost:8080/retail' \
--header 'Content-Type: application/json' \
--data '{
    "code": "aaa111",
    "qty":12

}'

Wholesale

curl --location 'http://localhost:8080/wholesale' \
--header 'Content-Type: application/json' \
--data '{
    "partner":"superstore",
    "code": "aaa111",
    "qty":12
}'

GET

Metrics

curl --location 'http://localhost:8080/metrics'

Tests

$ go test ./... 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published