摘要:
from concurrent import futures import time import grpc from example import helloworld_pb2_grpc, helloworld_pb2 # 实现 proto 文件中定义的 GreeterServicer class 阅读全文
posted @ 2020-12-21 19:01
DaisyLinux
阅读(1119)
评论(0)
推荐(0)
摘要:
版本:1.24.3 接受请求 首先来看 上期文章 中提到的接受请求线程 def _serve(state): while True: timeout = time.time() + _DEALLOCATED_SERVER_CHECK_PERIOD_S event = state.completion 阅读全文
posted @ 2020-12-21 14:49
DaisyLinux
阅读(685)
评论(0)
推荐(0)
摘要:
上一节学习了protoc命令的用法,以及配合生成grpc的相关。这一节,来学习一下proto文件中的语法规则。 protoc 命令通过解析 *.proto文件,来生成对应语言的服务文件。 看一个例子: syntax = "proto3"; package proto; option go_packa 阅读全文
posted @ 2020-12-21 00:32
DaisyLinux
阅读(1531)
评论(0)
推荐(0)