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

Use options for binding services #90

Closed
wants to merge 1 commit into from
Closed

Conversation

emcfarlane
Copy link
Collaborator

Idea for keeping service bindings as Options. ServiceOption no longer implements TranscoderOption. To add default service options call: WithDefaultServiceOption(svcOpts...). This lets us hide the *Service implementation and move NewService and NewServiceWithSchema to WithService and WithServiceFromSchema.

vanguardgrpc no longer returns a http.Handler but instead creates a new option for the transcoder:

handler, err := vanguard.NewTranscoder(
    vanguardgrpc.WithGRPCServer(server),
)

@emcfarlane emcfarlane self-assigned this Oct 12, 2023
@emcfarlane emcfarlane mentioned this pull request Oct 12, 2023
@emcfarlane
Copy link
Collaborator Author

Feel free to close @akshayjshah

@emcfarlane
Copy link
Collaborator Author

Closing, talked over with Akshay. Having the services not truly be optional is the main downside. This approach mixes the boundary too far.

@emcfarlane emcfarlane closed this Oct 20, 2023
@emcfarlane emcfarlane deleted the ed/optionals branch October 20, 2023 18:57
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

Successfully merging this pull request may close these issues.

1 participant