-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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(socket_listener): Add vsock support to socket listener and writer #14172
Conversation
- Add vsock case to Connect() - Sanity check for CID and port parameter
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.
Thanks for the nice feature @ke55ler! Just some small comments regarding comments. :-)
|
||
addrTuple := strings.SplitN(u.String(), ":", 2) | ||
|
||
//check if address string has two tokens |
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.
Please leave a space between //
and the comment as otherwise this might be interpreted as a comment targetted for a machine/go directive...
//check if address string has two tokens | |
// Check address string for containing two tokens |
//parse CID and port number from address string | ||
// CID and port numner are 32 bit | ||
// source: https://man7.org/linux/man-pages/man7/vsock.7.html |
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.
Same as above
//parse CID and port number from address string | |
// CID and port numner are 32 bit | |
// source: https://man7.org/linux/man-pages/man7/vsock.7.html | |
// Parse CID and port number from address string both being 32-bit | |
// source: https://man7.org/linux/man-pages/man7/vsock.7.html |
if spl[0] == "vsock" { | ||
addrTuple := strings.SplitN(spl[1], ":", 2) | ||
|
||
//check if address string has two tokens |
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.
See comment on input
//check if address string has two tokens | |
// Check address string for containing two tokens |
//parse CID and port number from address string | ||
// CID and port numner are 32 bit | ||
// source: https://man7.org/linux/man-pages/man7/vsock.7.html |
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.
See comment on input
//parse CID and port number from address string | |
// CID and port numner are 32 bit | |
// source: https://man7.org/linux/man-pages/man7/vsock.7.html | |
// Parse CID and port number from address string both being 32-bit | |
// source: https://man7.org/linux/man-pages/man7/vsock.7.html |
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
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.
Thanks for the PR!
resolves #6382
Added virtual socket (vsock) support to the inputs.socket_listener and outputs.socket_writer plugins
So far I could find out, it is not possible to create a vsock listener on the host and write to the same virtual socket from the host, you have to connect from a virtual machine, therefore I have not included additional unit tests