Skip to content

drpchttp: add helpers for ALPN support#54

Draft
hdonnay wants to merge 1 commit intostorj:mainfrom
hdonnay:hack/alpn
Draft

drpchttp: add helpers for ALPN support#54
hdonnay wants to merge 1 commit intostorj:mainfrom
hdonnay:hack/alpn

Conversation

@hdonnay
Copy link
Copy Markdown

@hdonnay hdonnay commented Jul 26, 2024

I was looking at using DRPC and would want to run it on the same server connection as an existing API. ALPN is the "native" way to do this, so I took a pass at implementing it. Sending a PR in case it's something that would be useful for upstream.

I couldn't find if there was a Gerrit instance this sort of thing should go to instead.

ALPN is the "native" way to run multiple protocols over the same
(encrypted) connection, and the common way to use it in go is via
`net/http`'s "next protocol" support.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>
@hdonnay
Copy link
Copy Markdown
Author

hdonnay commented Jul 26, 2024

Here's the rendered documentation for the added bits. (Looks like firefox mangled it a bit, sorry.)
drpc_alpn_docs

@zeebo
Copy link
Copy Markdown
Collaborator

zeebo commented Aug 11, 2024

I finally checked my emails and saw this PR. I haven't taken a detailed look yet (I'll try to do that tomorrow), but I think this might live better in the drpcmigrate package (which is where we have code to do muxing based on some header prefix at the start of the data). The drpchttp package is more about serving drpc endpoints over http.

Also we do have gerrit at https://review.dev.storj.io/ but this works fine as well, whichever you prefer. I should add a link in the main README.

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.

2 participants