sponge 中文文档
sponge is a powerful tool for generating web and microservice code, as well as a microservice framework based on gin and grpc encapsulation. Sponge has a wealth of code generation commands, and different functional codes can be combined to form a complete service (similar to artificially scattered sponge cells that can automatically recombine into a new sponge). Microservice code functions include logging, service registration and discovery, registration center, flow control, fuse, link tracking, metric monitoring, pprof performance analysis, statistics, cache, CICD and other functions. The code is decoupled and modularly designed, making it easy to build complete engineering code from development to deployment, making it more convenient, easy and efficient to develop with Go language.
The generated code is based on three approaches Yaml, SQL and Protobuf, each possessing different functional code generation, and the framework diagram of the generated code is shown in Figure 1-1.
Figure 1-1 sponge generation code framework diagram
The microservice code framework created by sponge is shown in Figure 1-2, this is a typical microservice hierarchy with high performance, high scalability, and includes common service governance features.
Figure 1-2 Microservices framework diagram
Currently, it supports generating 13 functional codes (including web services, microservices, rpc gateway services, CRUD, templates, cache, etc.), and more functional codes are gradually added later. Sponge's online UI demo: https://go-sponge.com/ui
After installing the sponge, start the UI service:
sponge run
Visit http://localhost:24631
in your browser, generate code by manipulating it on the page.
- 1_web-gin-CRUD
- 2_web-gin-protobuf
- 3_micro-grpc-CRUD
- 4_micro-grpc-protobuf
- 5_micro-gin-rpc-gateway
- 6_micro-cluster
If it's help to you, give it a star ⭐.
See the LICENSE file for licensing information.