Installing GRPC in Windows

Source: Internet
Author: User

1, installation Protobuf

In https://github.com/google/protobuf/releases

Download

Protoc-3.5.1-win32.zip

Put the extracted protoc.exe into the gopath\bin.

2, Installation Grpc

Git Clone Https://github.com/grpc/grpc-go

Rename the grpc-go to grpc into google.golang.org with the full path as follows

D:\gopath\src\google.golang.org\grpc

3, Installation Genproto

Git Clone Https://github.com/google/go-genproto

Rename the clone down folder to Genproto and put it under google.golang.org, the full path is as follows

D:\gopath\src\google.golang.org\genproto

4. Download the text package

git clone https://github.com/golang/text.git

5. Download NET Package

git clone https://github.com/golang/net.git

6, installation Proto

Go get-u Github.com/golang/protobuf/proto

7, Installation Protoc-gen-go

Go get-ugithub.com/golang/protobuf/protoc-gen-go

8. Verification

Enter the following directory

Src\google.golang.org\grpc\examples\helloworld>

Execute Command Generation code HELLOWORLD.PB.GO

Protoc-i./helloworld--go_out=plugins=grpc:./helloworld./helloworld\helloworld.proto

Enter the Greeter_server to execute

Go Run main.go

Enter the Greeter_client to execute

Go Run main.go

2018/06/19 11:29:25 Greeting:hello World

Process finished with exit code 0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.