Giter Site home page Giter Site logo

grpc-go-demo's Introduction

关于grpc

http://www.grpc.io/docs/quickstart/go.html

生成代码

cd src/helloworld protoc -I ./ helloworld.proto --go_out=plugins=grpc:. 将proto文件生成到当前目录下面。

run server & run client

go run server/main.go go run client/main.go

其他写在博客上面:

http://blog.csdn.net/freewebsys/article/details/59483427

增加了consul的测试:

https://github.com/freewebsys/grpc-go-demo/blob/master/src/consul/consul_test.go 测试的时候注册了3个tomcat,第3个在检测的时候是个错误的地址。 consul修改端口启动:

consul agent -dev -ui -server -node=consul-dev -client=10.0.2.15 -dns-port=53 -domain=freeweb.consul 

-dns-port=53 是将consul伪装成一个dns服务器。 -domain=freeweb.consul 是设置自己域。

grpc-go-demo's People

Watchers

James Cloos 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.