tahamajs's picture
download
raw
580 Bytes
package main
import (
"context"
"io"
"log"
pb "github.com/m-hariri/basic-go-grpc/proto"
)
func callGetOrderServerStream(client pb.OrderServiceClient, orders *pb.NamesList) {
log.Printf("Server streaming started")
stream, err := client.GetOrderServerStreaming(context.Background(), orders)
if err != nil {
log.Fatalf("Could not send orders: %v", err)
}
for {
message, err := stream.Recv()
if err == io.EOF {
break
}
if err != nil {
log.Fatalf("Error while streaming %v", err)
}
log.Println(message)
}
log.Printf("Server streaming finished")
}

Xet Storage Details

Size:
580 Bytes
·
Xet hash:
849d74b47c75258177ef49ba98adc50020c7db74a3123a71827e3ccb82bcbcb2

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.