Skip to content
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

Explain schema evolution #7

Open
tv42 opened this issue Nov 5, 2015 · 0 comments
Open

Explain schema evolution #7

tv42 opened this issue Nov 5, 2015 · 0 comments

Comments

@tv42
Copy link
Member

tv42 commented Nov 5, 2015

Go-specific details:

The idea is that if you have message Person v1 and message Person v2, the code gen would include an interface which is implemented by both (with fields getting default values where missing), so consuming code doesn't need to care which one it received.

An Envelope would include one number for Person v1 and another for Person v2.

Code that cares about types can type switch. Code that knows it'll always see Person v2 can skip the interface level and ask to view the right concrete type directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant