Coder Social home page Coder Social logo

golangltd / go-chassis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from go-chassis/go-chassis

0.0 2.0 1.0 2.34 MB

a high performance microservice framework for rapid development of micro services in Go

License: Apache License 2.0

Go 99.44% Shell 0.56%

go-chassis's Introduction

Go-Chassis

Build Status Coverage Status Go Report Card GoDoc HitCount Join Slack

Go-Chassis is a microservice framework for rapid development of microservices in Go

Features

  • Pluggable registrator and discovery service: Support Service center, istio pilot, kubernetes and file based registry, fit both client side discovery and server side discovery pattern
  • Pluggable Protocol: You can custom your own protocol, by default support http and grpc
  • Multiple server management: you can separate API by protocols and ports
  • Circuit breaker: Protect your micro service system in runtime
  • Route management: Able to route to different service based on weight and match rule to achieve Canary Release easily
  • Client side Load balancing: Able to custom strategy
  • Rate limiting: Both client side and server side rate limiting
  • Pluggable Cipher: Able to custom your own cipher for AKSK and TLS certs
  • Handler Chain: Able to add your own code during service calling for client and server side
  • Metrics: Able to expose Prometheus metric API automatically and custom metrics reporter
  • Tracing:Use opentracing-go as standard library, easy to integrate tracing impl
  • Logger: You can custom your own writer to sink log, by default support file and stdout
  • Hot-reconfiguraion: Powered by go-archaius, configurations can be reload in runtime, like load balancing, circuit breaker, rate limiting
  • Dynamic Configuration framework: Powered by go-archaius, developer is able to develop a service which has hot-reconfiguration feature easily
  • Fault Injection: In consumer side, you can inject faults to bring chaos testing into your system

You can check plugins to see more features

Quick Start

You can see more documentations in here

  1. Install go 1.10+

  2. Clone the project

git clone [email protected]:go-chassis/go-chassis.git
  1. Use go mod(go 1.11+, experimental but a recommended way)
cd go-chassis
GO111MODULE=on go mod download
#optional
GO111MODULE=on go mod vendor
  1. Install service-center

  2. Write your first http micro service

Examples

You can check examples here

Now examples is migrating to here

Communication Protocols

Go-Chassis supports 3 types of communication protocol.

  1. Rest - REST is an approach that leverages the HTTP protocol for communication.
  2. Highway - This is a RPC communication protocol, it was deprecated.
  3. 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

go-chassis's People

Contributors

asifdxtreme avatar crystaldust avatar eumji025 avatar gauthamiv avatar heppu avatar humingcheng avatar joseph-v avatar little-cui avatar liweiv avatar lizihuai avatar marknewmail avatar ninokop avatar ninotia avatar savitaashture avatar thandayuthapani avatar tianxiaoliang avatar tomlee0201 avatar wangkirin avatar willemjiang avatar zenlint avatar zqheng avatar

Watchers

 avatar  avatar

Forkers

yuanyunliang

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.