Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO gRPC Example Square

This example is based on command line tool

Installation

Installing all dependency files are managed by dep package manager

go get -u github.com/golang/dep/cmd/dep
dep ensure

Working

Example I have written uses a server client communication using tcp Client invoke server's service to get result. In this example Server does 2 function

  • Square
    • Return square of number
    • default number is 1
  • Cube
    • Return cube of number
    • default number is 1
go run client/main.go  -square 122 -cube 9
2018/04/26 15:10:54 Square of 122: 14884
2018/04/26 15:10:54 Cube of 9: 729

Runing

For this to work we need to run first run server and client.

Server

go run server/main.go

Client

go run client/main.go

About

Go gRPC example

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages