-
Notifications
You must be signed in to change notification settings - Fork 875
feat: add CoderVPN protocol definition & implementation #14855
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
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @spikecurtis and the rest of your teammates on |
5174c41
to
25ec905
Compare
"cdr.dev/slog" | ||
) | ||
|
||
type Tunnel struct { |
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.
Note to reviewers:
This component is not finished and not unit tested. I built the basic skeleton of it to inform how the API for the speaker
should look, and as an illustrative example for reviewers of how the speaker
will be used in practice.
It will be completed and tested after we have the other pieces in place to actually start the CoderVPN tunnel using the tailnet
package.
25ec905
to
39ca9e8
Compare
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.
Looks good overall, I like the extensive comments. Some potential suggestions related to naming.
case s.recvCh <- msg: | ||
s.logger.Debug(s.ctx, "passed received message to speaker") | ||
case <-s.ctx.Done(): | ||
s.logger.Debug(s.ctx, "recvLoop canceled", slog.Error(s.ctx.Err())) |
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.
Could probably omit the ctx.Err()
here
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'll admit it's almost always "context canceled" but sometimes it's "deadline exceeded" and that's interesting and occasionally useful in debugging, which is what Debug
messages are supposed to be for.
39ca9e8
to
c56c16b
Compare
c56c16b
to
48e91e4
Compare
closes #14731
Defines and implements the CoderVPN control protocol, which will be used to communicate with desktop client applications.