Today, I recommend go-garden, a micro-service framework suitable for starting learning. Compared to heavyweight frameworks like Go-Micro and Go-Zero, this framework is very lightweight, very simple to use, and supports all the usual features.

Go-garden is a distributed services framework for distributed systems architecture

Github address: github.com/panco95/go-…

Code cloud address: gitee.com/pancoJ/go-g…

concept

  • It provides core requirements for the development of distributed system architecture, including some infrastructure support for microservices, reducing developers’ basic development of microservices and focusing more on business development;
  • Support Http/Rpc protocol, Http framework using GIN, Rpc framework using RPCX;
  • RPC doesn’t require a protobuf, just defining the structure;
  • There is no integrated database, cache and other extensions. Considering that users may use different packages for service design, developers are advised to import such extension packages for use.
  • There is no limit to the code structure, only a configuration file and a few lines of code can start a service, the project structure is completely designed by the developer, we recommend using scaffolding tools to generate the project structure.

features

  • Service Registration Discovery
  • Gateway Route distribution
  • Gateway load Balancing
  • Rpc/Http protocol
  • Service flow limiting is available
  • Service fuse is available
  • Service retry can be configured
  • Available with timeout control
  • Dynamic Routing Configuration
  • Automatic Cluster Synchronization
  • Invoking Security Authentication
  • Distributed link tracking
  • Unified Log Storage
  • Scaffolding tool

Quick start

Go install github.com/panco95/go-garden/tools/[email protected] // Create project garden new my-gateway Gateway Garden new My-service service // Modify service and route configurations...... // Start the gateway go run my-gateway/main.go // Start the service go run my-service/main.goCopy the code

Tutorial: Quickly build microservices based on Go Garden

Visit Go Garden-based quick Build microservices and follow step by step to learn how to use Go-Garden

Tutorial: Code examples

Visit examples to see the complete sample project

Scaffolding: Quickly create by project

Visit Tools for scaffolding instructions