Coder Social home page Coder Social logo
 photo

go-chassis Goto Github PK

repos: 27.0 gists: 0.0

Type: Organization

Bio: focusing on go cloud native framework and service mesh solution to help developer to develop cloud service easily

Coverage Status Go Report Card GoDoc HitCount
goproxy.cn Documentation Status

中文版README

Go-Chassis is a microservice framework for rapid development of microservices in Go. it focus on helping developer to deliver cloud native application more easily. The idea of logo is, developer can recreate and customize their own "wheel"(a framework) by go chassis to accelerate the delivery of software.

Why use Go chassis

  • powerful middleware "handler chain": powerful than "filter" or "interceptor". each handler in chain is able to get the running result of backward handler and your business logic. It is very useful in varies of scenario, for example:
  1. a circuit breaker need to check command results
  2. track response status and record it, so that prometheus can collect them
  3. track critical response result, so that you can audit them
  4. distribute tracing, you can complete the end span spec after business logic executed

the commonplace above is helping you decouple common function from business logic. without handler chain. those function will couple with business logic

  • go chassis is designed as a protocol-independent framework, any protocol is able to integrate with go chassis and leverage same function like load balancing, circuit breaker,rate limiting, routing management, those function resilient your service

  • go chassis makes service observable by bringing open tracing and prometheus to it.

  • go chassis is flexible, many different modules can be replaced by other implementation, like registry, metrics, handler chain, config server etc

  • With many build-in function like route management, circuit breaker, load balancing, monitoring etc, your don't need to investigate, implement and integrate many solutions yourself.

Features

  • Pluggable discovery service: Support Service center, kubernetes. fit both client side discovery and server side discovery pattern, and you can disable service discovery to use end to end communication.
  • Pluggable Protocol: You can customize protocol, by default support http and grpc, go chassis define standardized model to makes all request of different protocol leverage same features
  • Multiple server management: you can separate API by protocols and ports
  • Handler Chain: Able to add your own code during service calling for client and server side
  • rich middleware: based on handler chain, supply circuit breaker, rate limiting, monitoring, auth features. see
  • Traffic marker Traffic marker module is able to mark requests in both client(consumer) or server(provider) side, with marker, you can govern traffic based on it.
  • Traffic management: Able to route to different service based on weight and match rule, it can be used in many scenario, such as canary release
  • Security: build in cipher, authentication, RSA related funtions
  • Safety and resilience: support fault-tolerant(retry, rate limiting, client-side load-balancing, circuit breaker) to makes your service facing any unpredictable situation.
  • Telemetry: Able to expose Prometheus metric API automatically and customize metrics report. Use opentracing-go as standard library.
  • Backing services: use backend service as a plugin, so that your app can be easily tested, and swap to another plugin.
  • Hot re-configuration: Powered by go-archaius, configurations can be reload in runtime, like load balancing, circuit breaker, rate limiting, developer is also able to develop a service which has hot-reconfiguration feature easily. see
  • API first go chassis will automatically generate Open API 2.0 doc and register it to service center. you can manage all the API docs in one place
  • Spring Cloud integrate with servicecomb, go chassis can work together with spring cloud.
  • Service mesh: you can introduce multi-language to your microservice system. powered by servicecomb-mesher.
  • Less dependencies: checkout the go.mod file, it has less dependency on open source project by default, to import more features checkout plugins to see more features

Get started

1.Generate go mod

go mod init

2.Add go chassis

 go get github.com/go-chassis/go-chassis/[email protected]

if you are facing network issue

export GOPROXY=https://goproxy.io

3.Write your first http micro service

Documentations

You can see more documentations in here,

Examples

You can check examples here

NOTICE: Now examples is migrating to here

Communication Protocols

Go-Chassis supports 2 types of communication protocol.

  1. http - an approach that leverages the HTTP protocol for communication.
  2. gRPC - native grpc protocol, go chassis bring circuit breaker, route management etc to grpc.

Debug suggestion for dlv:

Add -tags debug into go build arguments before debugging, if your go version is go1.10 onward.

example:

go build -tags debug -o server -gcflags "all=-N -l" server.go

Chassis customized debug tag to resolve dlv debug issue:

golang/go#23733

https://github.com/derekparker/delve/issues/865

Other project using go-chassis

Known Users

To register your self, go to #592

huawei qutoutiao Shopee
tencent-ieg changhong

Contributing

If you're interested in being a contributor and want to get involved in developing, please check CONTRIBUTING and wiki for details.

Join slack

Committer

  • ichiro999
  • humingcheng

go-chassis's Projects

cari icon cari

cloud application runtime interface

etcdadpt icon etcdadpt

Expose a standard KV operation API, adapt to embeded etcd and etcd client

foundation icon foundation

common tools can be used in any go project, such as restful client

glog icon glog

Leveled execution logs for Go

go-archaius icon go-archaius

a dynamic configuration framework used in distributed system

go-bmi icon go-bmi

Body Mass Index(BMI) application developed by go-chassis microservice framwork

go-chassis icon go-chassis

a cloud native application framework for Go with rich eco-system

go-chassis-bench icon go-chassis-bench

This tool helps to evaluate the performance of your service developed by go-chassis

go-chassis-cloud icon go-chassis-cloud

a go chassis plugin libary to integrate with cloud provider API and service

go-chassis-config icon go-chassis-config

pull and push configs in distributed configuration management service. migrated to go-archaius https://github.com/go-chassis/go-archaius/pull/87

go-restful icon go-restful

package for building REST-style Web Services using Go

huawei-apm icon huawei-apm

a Go lib to send kpi and tracing message to huawei cloud apm

kie-client icon kie-client

Go client of https://github.com/apache/servicecomb-kie

landscape icon landscape

🌄The Cloud Native Interactive Landscape filters and sorts hundreds of projects and products, and shows details including GitHub stars, funding or market cap, first and last commits, contributor counts, headquarters location, and recent tweets.

openlog icon openlog

A tool to unify loggers in one go project which depend on a lot of go vendors

registrator icon registrator

a tool to register service instance from discovery service to registrator service

swagger-codegen icon swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.

weathermap icon weathermap

使用ServiceComb实现的经典天气预报应用

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.