简体   繁体   English

如何在不编译Event API原型的情况下收听Skaffold事件?

[英]How to listen to Skaffold events without compiling the Event API protos?

I am experimenting with the Skaffold Event API. 我正在尝试使用Skaffold Event API。 From a python application I would like to listen to the events over HTTP that are exposed through port 50052 on the /v1/events endpoint. 从python应用程序,我想听通过/ v1 / events端点上的端口50052公开的HTTP 事件

I have compiled the .proto files to python by roughly following this gRPC guide and I can listen to the events by connecting to the gRPC server on 50051 using the generated code. 我已经通过大致遵循这个gRPC指南将.proto文件编译成python,我可以通过使用生成的代码连接到50051上的gRPC服务器来监听事件。

I have tried the python library hyper to listen push events through an HTTP2 connection with no luck. 我已经尝试过python库hyper来通过HTTP2连接监听推送事件而没有运气。

I would like to avoid the overhead of generating code. 我想避免生成代码的开销。 Is it possible to listen to the Events API through other means? 是否可以通过其他方式收听Events API?

as per documentation: 根据文件:

Events are API objects and are removed from the apiserver on master one hour after the last occurrence to avoid filling up the master disk. 事件是API对象,并在最后一次出现后一小时从主服务器上删除,以避免填满主磁盘。 To provide longer history and aggregation capabilities, a third party solution should be installed to capture events. 要提供更长的历史记录和聚合功能,应安装第三方解决方案来捕获事件。

If that suits your requirements you can try and deploy event exporter to the stack driver 如果这符合您的要求,您可以尝试将事件导出部署到堆栈驱动程序

Stack driver provides information about the incidents and other events associated with alerting policies. 堆栈驱动程序提供有关事件以及与警报策略关联的其他事件的信息。 you can find more information here . 你可以在这里找到更多信息。

It support also different client library like C#, GO, Java, python ... 它还支持不同的客户端库,如C#,GO,Java,python ......

In addition: 此外:

Please be warned: hyper is in a very early alpha. 请注意: 超级是非常早期的alpha。 You will encounter bugs when using it. 使用它时会遇到错误。 In addition, there are very many rough edges. 此外,还有很多粗糙的边缘。 With that said, please try it out in your applications: I need your feedback to fix the bugs and file down the rough edges. 话虽如此,请在您的应用程序中尝试:我需要您的反馈来修复错误并归档粗糙的边缘。

Hope this help. 希望这有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM