-
Notifications
You must be signed in to change notification settings - Fork 5
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
Split http adapter logic out of the broker #29
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.
Overall this looks great. Thanks again for all the work. It appears there is more work to fit the adapter into the existing component mold. But I think the best approach is to massage it so it does and have the broker treat it like any other component instead of making exceptions for adapters.
Items left before this can be moved out of draft state:
engine.go
: Determine the best way to pass along the context around the target adapter to the HTTP server. Since it's already being looked up in this code we shouldn't need to replicate the same code in the HTTP server, instead we should probably just pass along the context we found.sub_mgr.go
: Is the implementation I wrote the best method to connect a request out to the HTTP server?http server, http_client.go
: I need to get some context about the target adapter for the request in theSendEvent()
function. I need to know the host, method, headers, ect...http server, http_client.go
: When sending the response back - Will need to determine which is the correct timestamp to send backProblem:
Solution:
Testing:
Verified that running the changes allowed me to execute a full round trip and receive a response: