New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two questions about processing "*.proto" files #1456

Closed
NanXiao opened this Issue Aug 29, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@NanXiao
Contributor

NanXiao commented Aug 29, 2016

Hi all,

I have two questions about processing *.proto files:

(1) For testing purpose only, if I modify the *.proto files, how to re-generate *.pb.go files? I can't find the answers from README.md;

(2) How to generate other language support files from *.proto files, such as python?

Thanks very much in advance!

@dperny

This comment has been minimized.

Show comment
Hide comment
@dperny

dperny Aug 29, 2016

Member

(1) You can generate the .proto files by doing make generate. Any time you modify the proto files, you have to redo generate and then commit the changes, or your PR will fail CI.

(2) There has been some discussion in the past about what we have to do to make proto files portable (I think #647 is one of these) but because all of the grpc is internal to the cluster, there's no good reason to generate protos for other languages.

Does this answer your questions well enough?

Member

dperny commented Aug 29, 2016

(1) You can generate the .proto files by doing make generate. Any time you modify the proto files, you have to redo generate and then commit the changes, or your PR will fail CI.

(2) There has been some discussion in the past about what we have to do to make proto files portable (I think #647 is one of these) but because all of the grpc is internal to the cluster, there's no good reason to generate protos for other languages.

Does this answer your questions well enough?

@NanXiao

This comment has been minimized.

Show comment
Hide comment
@NanXiao

NanXiao Aug 30, 2016

Contributor

@dperny Thanks very much for your kind answer!

For question (2), I want to do a GUI which will display the cluster visually, so I consider whether I can utilize the *.proto files to generate source code files for other languages. If it can't, maybe I need define the *.proto file personally, so I just think whether I can resue exist stuff to avoid repeating work again.

Contributor

NanXiao commented Aug 30, 2016

@dperny Thanks very much for your kind answer!

For question (2), I want to do a GUI which will display the cluster visually, so I consider whether I can utilize the *.proto files to generate source code files for other languages. If it can't, maybe I need define the *.proto file personally, so I just think whether I can resue exist stuff to avoid repeating work again.

@dperny

This comment has been minimized.

Show comment
Hide comment
@dperny

dperny Aug 30, 2016

Member

IMHO it might be a better idea to use the Docker API to build your visualizer; the grpc API isn't really meant to be consumed publicly.

If you were dead set on using grpc directly, it maybe could be done. I don't know what work has to go into making those proto files work in another language. It might be easy or it might be hard. The only answer I have is it's not officially supported.

Member

dperny commented Aug 30, 2016

IMHO it might be a better idea to use the Docker API to build your visualizer; the grpc API isn't really meant to be consumed publicly.

If you were dead set on using grpc directly, it maybe could be done. I don't know what work has to go into making those proto files work in another language. It might be easy or it might be hard. The only answer I have is it's not officially supported.

@NanXiao NanXiao closed this Sep 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment