-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: add new Go bindings to perform HTTP requests #173
Conversation
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.
LGTM, great work @Angelmmiguel. Minor comments and questions.
wit/go-ephemeral/http-types.wit
Outdated
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.
This file exists due to the issues you mentioned with WIT format and incompatibilities at the WIT format between those versions, right? I guess, the idea is to have a single WIT directory with the definitions that all kits consume at some point, right?
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.
Exactly. WIT has evolved a lot and there're some breaking changes while the spec stabilizes. The end goal is to have a single WIT definition once we can recreate all kits based on it.
Currently, this is the situation:
- core: oldest WIT version
- go-ephemeral: WIT version before packages
Co-authored-by: Rafael Fernández López <[email protected]>
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.
LGTM 👏
Define the new HTTP bindings for the Go kit and expose a new
SendHttpRequest
method. It includes new WIT files that are required due to a mismatch between thewit-bindgen
version used by the host (v0.2) and the Go kit (v0.6). I also had to adapt the generated code to work between these versions. You have all the information in thekits/go/worker/README.md
file.Changes
wit/core
but are compatible withwit-bindgen
v0.6.kits/go/worker/README.md
file.SendHttpRequest
method in the Go kit.http.Request
andhttp.Response
structs instead of the internal ones.It refs #165