Let’s write CRUD operations using Go-kit with MySQL as Database.
I have not found a proper resource to build a microservice using Go-kit. Although there were examples provided by Gokit their documentation was dull (IMO). I then decided to help beginners by writing a blog.
gokit
Let’s just see what GO-KIT is
From the Gokit Readme
Go kit is a programming toolkit for building microservices (or elegant monoliths) in Go. We solve common problems in distributed systems and application architecture so you can focus on delivering business value.
Go kit is advertised as a “standard library/toolkit for microservices”, deliberately avoiding the term framework. While frameworks often require you to write code following a certain style (eg. put everything in an HTTP handler), Go kit provides an integration layer between your business logic and various transports (like HTTP or gRPC), allowing you to focus on what’s important: your business.
GoKit Architecture
The major components in Gokit architecture
Transport Layer
Endpoint Layer
Service Layer
#go #microservices #golang #mysql #database