使用多语言查询 GRPC 服务并将时间戳作为请求参数之一传递

Using polyglot to query GRPC service and pass timestamp as one of the request parameters

我从命令行调用 polyglot 来查询 GRPC 服务。我正在构造的请求对象有一个名为 'as_of' 的 TimeStamp 属性。如何传递有效的时间戳?格式应该是什么以及如何生成格式?

我尝试发送“2019/03/05 23:59”,但没有成功。下面是我对 grpc 服务的命令行调用。

echo -n '{"source_system": "TEST", "customer_id": 20100, "as_of": "2019/03/05 23:59"}' | java -jar ~/support/lib/polyglot.jar --command=call --endpoint=localhost:10443 --full_method='comp.test.model.TradeService/GetDeals' 2> /dev/null

时间戳是 encoded as RFC 3339 in JSON。所以它应该看起来像 2019-03-05T23:59:00Z.