-
Notifications
You must be signed in to change notification settings - Fork 4
Prep for stable API #42
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
Conversation
bergundy
commented
Feb 5, 2025
- Remove EXPERIMENTAL warning from README and mark specific exports as experimental
- Sanitize token header
- Add AddHandlerLinks method and deprecate links on result objects
// Can be called from an [Operation] handler Start method or from a [Handler] StartOperation method. The context | ||
// provided must be the context passed to the handler. This method may be called multiple times for a given handler, | ||
// each call appending additional links. Links will only be attached on successful responses. | ||
func AddHandlerLinks(ctx context.Context, links ...Link) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should be able to see links that exist, remove links, etc. I would recommend at least a getter and setter (though access to a structure that contains links as a field may be better, but I understand the thread safety fear even if I don't share it). Feel free to make the getter copy the slice before returning. You can keep add in addition to set if you'd like, though you may want to call it "append", your choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I already merged, I can address in a followup PR if needed.
I think it's okay to expose a simple API for now, following https://pkg.go.dev/google.golang.org/grpc#SetHeader, and add more functionality later.