Coder Social home page Coder Social logo

jangocheng / share Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wangming1993/share

0.0 1.0 0.0 51.02 MB

基于 go + grpc + consul 的微服务系统

Home Page: https://wangming1993.github.io/share

License: GNU General Public License v3.0

Dockerfile 1.43% Shell 3.22% Go 94.60% HTML 0.75%

share's Introduction

基于 go + grpc + consul 的微服务系统

Build Status

启动 consul

docker pull consul

docker run -d -p 8500:8500 consul

# 访问 http://127.0.0.1:8500/ui/#/dc1/services 

生成桩文件

cd $GOPATH/src/github.com/wangming1993/share/grpc/proto

docker pull registry.cn-hangzhou.aliyuncs.com/wangming/protoc:1.0

./gen-stub

启动 grpc 服务器

cd $GOPATH/src/github.com/wangming1993/share/grpc/server

# 启动hello service
go run hello/main.go

# 启动 member service
go run member/main.go

# 启动多个grpc service 以测试负载均衡
go run hello/main.go --port=1801
go run member/main.go --port=1802

客户端调用

cd $GOPATH/src/github.com/wangming1993/share/grpc/client

go run main.go

share's People

Contributors

wangming1993 avatar

Watchers

 avatar

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.