Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xinpianchang/xservice
Another excellent micro service framework
https://github.com/xinpianchang/xservice
golang grpc microservice restful-api webframework
Last synced: about 2 months ago
JSON representation
Another excellent micro service framework
- Host: GitHub
- URL: https://github.com/xinpianchang/xservice
- Owner: xinpianchang
- License: mit
- Created: 2021-06-26T05:44:46.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-07T05:24:16.000Z (about 1 year ago)
- Last Synced: 2024-11-25T12:06:29.133Z (2 months ago)
- Topics: golang, grpc, microservice, restful-api, webframework
- Language: Go
- Homepage:
- Size: 437 KB
- Stars: 9
- Watchers: 4
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# xservice
[![License](https://img.shields.io/github/license/xinpianchang/xservice?style=flat-square)](https://raw.githubusercontent.com/xinpianchang/xservice/master/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/xinpianchang/xservice?style=flat-square)](https://goreportcard.com/report/github.com/xinpianchang/xservice)
[![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-blue?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/xinpianchang/xservice)Another excellent micro service framework
## Features
- RESTful API (base on echo/v4)
- gRPC & gRPC gateway service & Swagger document generation
- Service discovery (base on ETCD/v3)
- gRPC & gRPC-Gateway & RESTful API all in one tcp port, mux via `cmux`
- Builtin middlewares & easily to extended
- Prometheus & Tracing (jaeger) & Sentry integrated
- Embed toolset for code generation (e.g. GORM & model CRUD & project layout)## Quick start
Install toolset.
```bash
go install github.com/xinpianchang/xservice/tools/xservice@latest
``````bash
# smaller binary size commands with -ldflags="-s -w"
go install -ldflags="-s -w" github.com/xinpianchang/xservice/tools/xservice
```Create new project via toolset.
```bash
mkdir hello
cd hello
xservice new --module github.com/example/hello
```Open the generated `README.md` file, following the initialize steps and happing coding. 🎉
## Resource
- go-zero https://github.com/zeromicro/go-zero (inspired)
- micro https://github.com/asim/go-micro (inspired)
- GORM http://gorm.io/
- Echo https://echo.labstack.com/
- validator https://github.com/go-playground/validator
- gRPC generate tool/buf https://buf.build/
- gRPC validate https://github.com/envoyproxy/protoc-gen-validate
- RESTful validate https://github.com/go-playground/validator
- gRPC-Gateway https://grpc-ecosystem.github.io/grpc-gateway/
- jaeger https://www.jaegertracing.io/