<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>streaming on Golang</title><link>https://golang.k5kc.com/tags/streaming/</link><description>Recent content in streaming on Golang</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sun, 16 Aug 2020 00:19:00 +0530</lastBuildDate><atom:link href="https://golang.k5kc.com/tags/streaming/index.xml" rel="self" type="application/rss+xml"/><item><title>Building a gRPC Client in Go</title><link>https://golang.k5kc.com/2020/08/16/10.building-grpc-client/</link><pubDate>Sun, 16 Aug 2020 00:19:00 +0530</pubDate><guid>https://golang.k5kc.com/2020/08/16/10.building-grpc-client/</guid><description>In this section, we&amp;rsquo;ll look at creating a Go client for our RouteGuide service. You can see our complete example client code in grpc-go/examples/route_guide/client/client.go.
Creating a stub To call service methods, we first need to create a gRPC channel to communicate with the server. We create this by passing the server address and port number to grpc.Dial() as follows:
conn, err := grpc.Dial(*serverAddr) if err != nil { ... } defer conn.</description></item><item><title>Building a gRPC Server in Go</title><link>https://golang.k5kc.com/2020/08/16/9.building-grpc-server/</link><pubDate>Sun, 16 Aug 2020 00:18:00 +0530</pubDate><guid>https://golang.k5kc.com/2020/08/16/9.building-grpc-server/</guid><description>Let’s start off by defining a really simple gRPC server in Go. Once we have a simple server up and running we can set about creating a gRPC client that will be able to interact with it.
We will start off by writing the logic within our main function to listen on a port for incoming TCP connections:
main.go
package main import ( &amp;#34;log&amp;#34; &amp;#34;net&amp;#34; ) func main() { lis, err := net.</description></item><item><title>Cobra - Create CLI in Go</title><link>https://golang.k5kc.com/2020/08/16/1.setup-cobra/</link><pubDate>Sun, 16 Aug 2020 00:17:00 +0530</pubDate><guid>https://golang.k5kc.com/2020/08/16/1.setup-cobra/</guid><description>Golang for CLI Go is the perfect language to develop command line applications. Go has a few advantages that really set it apart from other languages:
Single binary Very fast execution time, no interpreter needed Go is awesome! Cross platform support Command line based applications are nearly as old as computing itself but this doesn’t mean that they haven’t evolved. Traditional cli applications used flags to manage the different behaviors an application could perform.</description></item></channel></rss>