Go-grpc - This is grpc server for golang.

Related tags

Network go-grpc
Overview

go-grpc

This is grpc server for golang.

protocのインストール

brew install protoc

Golang用のプラグインのインストール

go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]

.protoファイルから自動生成

protoc --go_out=. --go-grpc_out=require_unimplemented_servers=false:. ./proto/todo.proto

ローカルでgrpcを使うためのインストール

brew tap grpc/grpc
brew install grpc

コンテナの起動

docker-compose up

grpc_cliでの動作確認

command

grpc_cli ls localhost:50051

response

grpc.reflection.v1alpha.ServerReflection
todo_app.ToDoService

command

grpc_cli ls localhost:50051 todo_app.ToDoService -l

response

filename: proto/todo.proto
package: todo_app;
service ToDoService {
  rpc CreateTask(todo_app.CreateTaskRequest) returns (todo_app.CreateTaskResponse) {}
  rpc ShowList(todo_app.ShowListRequest) returns (todo_app.ShowListResponse) {}
}

command

grpc_cli call localhost:50051 todo_app.ToDoService.CreateTask 'title: "HELLO"'

response

connecting to localhost:50051
title: "HELLO"
create_time {
  seconds: 1641139300
  nanos: 49475000
}

ドキュメント生成用のインストール

go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc

ドキュメントの自動生成

protoc --doc_out=html,index.html:./doc proto/*.proto

参考資料

Owner
jotaro yuza
jotaro yuza
Go-grpc - This is grpc server for golang.

go-grpc This is grpc server for golang. protocのインストール brew install protoc Golang用のプラグインのインストール go install google.golang.org/protobuf/cmd/protoc-gen-go

jotaro yuza 1 Jan 2, 2022
GRPC - A client-server mockup, using gRPC to expose functionality.

gRPC This is a mockup application that I built to help me visualise and understand the basic concepts of gRPC. In this exchange, the client can use a

Fergal Bittles 0 Jan 4, 2022
Go-grpc-tutorial - Simple gRPC server/client using go

Simple gRPC server/client using go Run server go run usermgmt_server/usermgmt_

Renner Poveda 0 Feb 14, 2022
Go-grpc-template - A small template for quickly bootstrapping a, developer platform independent gRPC golang application

go-grpc-template A small template for quickly bootstrapping a developer platform

null 1 Jan 20, 2022
A suite of gRPC debugging tools. Like Fiddler/Charles but for gRPC.

grpc-tools A suite of tools for gRPC debugging and development. Like Fiddler/Charles but for gRPC! The main tool is grpc-dump which transparently inte

Bradley Kemp 1.1k Apr 27, 2022
grpc-http1: A gRPC via HTTP/1 Enabling Library for Go

grpc-http1: A gRPC via HTTP/1 Enabling Library for Go This library enables using all the functionality of a gRPC server even if it is exposed behind a

StackRox 76 May 2, 2022
Go based grpc - grpc gateway micro service example

go-grpc-gateway-server This repository provides an example for go based microservice. Go micro services developed based on gRPC protobuf's and also us

Suresh Yekasiri 0 Dec 8, 2021
Simple grpc web and grpc transcoding with Envoy

gRPC Web and gRPC Transcoding with Envoy This is a simple stand-alone set of con

null 0 Dec 25, 2021
GRPC - Creating a gRPC service from scratch

#Go gRPC services course Creating a gRPC service from scratch Command line colle

Rafael Diaz Miles 1 Jan 2, 2022
Totem - A Go library that can turn a single gRPC stream into bidirectional unary gRPC servers

Totem is a Go library that can turn a single gRPC stream into bidirectional unar

Joe Kralicky 2 Jan 10, 2022
Grpc-gateway-map-null - gRPC Gateway test using nullable values in map

Demonstrate gRPC gateway behavior with nullable values in maps Using grpc-gatewa

null 1 Jan 6, 2022
Todo-app-grpc - Go/GRPC codebase containing RealWorld examples (CRUD, auth, advanced patterns, etc)

Go/GRPC codebase containing RealWorld examples (CRUD, auth, advanced patterns, e

Sammi Aldhi Yanto 2 May 14, 2022
Raft-grpc-demo - Some example code for how to use Hashicorp's Raft implementation with gRPC

raft-grpc-example This is some example code for how to use Hashicorp's Raft impl

dougsong 1 Jan 4, 2022
Benthos-input-grpc - gRPC custom benthos input

gRPC custom benthos input Create a custom benthos input that receives messages f

Marco Amador 3 Apr 3, 2022
Grpc-train - Train booking demo using gRPC

gRPC Demo: Train Booking Service Description Usage Contributing Development Tool

Fadi Asfour 0 Feb 6, 2022
This repo contains a sample app exposing a gRPC health endpoint to demo Kubernetes gRPC probes.

This repo contains a sample app exposing a health endpoint by implementing grpc_health_v1. Usecase is to demo the gRPC readiness and liveness probes introduced in Kubernetes 1.23.

Nico Meisenzahl 1 Feb 9, 2022
Golang http&grpc server for gracefully shutdown like nginx -s reload

supervisor Golang http & grpc server for gracefully shutdown like nginx -s reload if you want a server which would be restarted without stopping servi

Terry Fei 0 Jan 8, 2022
Create a gRPC server from code generated by sqlc

sqlc-grpc Create a gRPC Server from the generated code by the awesome sqlc project. Dependencies Go 1.16 or superior protoc sqlc, protoc-gen-go and pr

Walter Wanderley 57 Apr 29, 2022
Create a gRPC Server from Database

xo-grpc Create a gRPC Server from the generated code by the xo project. Requirements Go 1.16 or superior protoc xo, protoc-gen-go and protoc-gen-go-gr

Walter Wanderley 22 Apr 6, 2022